I am having a very frustrating problem: the value of LINE is wrong.
Here is my test file in its entirety:
<?php
function function_name() {
}
function function_name2() {
}
echo "Line: " . LINE . "<br>";
?>
The output of this should be "Line: 6". However, it's in fact "Line: 4". I've tested this on the following configurations:
- PHP 4.0.3pl1 on NT/IIS4
- PHP 4.0.2 on Mac OS X PB/Apache 1.3.12
- PHP 4.0.3pl1 on Linux/Apache 1.3.14
All of these return the incorrect value for LINE.
This is a big problem for debugging because errors use LINE. It's about 8 times harder to debug an error if you have to spend 10 minutes just locating it.