[eluser]Henry Weismann[/eluser]
Hey CI coders,
I have a problem with my php errors:
Code:
<?php
//minus one line
//minus one line
//minus one line
//minus one line
//minus one line
//minus one line
error line 4 because line 3 through 8 compiler does not count so line 9 is 3 and line 10 where this error is...is line 4...delete this entire line to see the next error
function hello()
{
//minus one line
//minus one line
echo "hello world";
error line 8 because line 3 - 8 and 13 - 14 compiler does not count so lines 9-12 are lines 3-6 and line 15 is 7
}
?>
It seems my compiler is not calculating error line numbers correctly when I have single line comments. If I change them to /* multiline */ comments I don't have the problem.
I have tried two php servers so far with the same results PHP Version 5.2.8 and 5.2.9. I thought maybe it was because of the encoding of the file or maybe the text editor I use (notepad++), a server setting, a php setting or something. It may also depend on how php is installed and running such as a CGI process.
Can anyone replicate this on their servers?
If others can replicate it...it must be a bug. If it were a bug I would think someone would have noticed this by now so I cant imagine it is a bug that has gone unnoticed.
Searching google was just endless pages about missing brackets and obvious answers to the wrong line number problem.
Anyone have any idea whats up?