Jump to content

PHP error_reporting


evilstrike

Recommended Posts

I have a new install of php on solaris and I have this string error_reporting problem that I have never seen
in my php.ini I have error_reporting = E_ALL & ~ E_NOTICE
here is the problem
[code]
<?php
echo "test";
?>
ouput: test

<?php
echo "test";
echo "123test"
?>
output test123test
**Notice the missing ";" at the end of the last line? php is not reporting an error and the page shows up correctly even with missing ";"
now if I do
<?php
echo "test"
echo "123test";
?>
output: Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';'
[/code]

PHP is not reporting the missing ";" only on the last line.  If I omit to add it to any other line then it will show the error.  Meaning that If I only have 1 line it is not going to show the error and if I have multiple lines the error will not show if the last line is the only line missing the ";" but will show if any other lines are missing it.
Anyone has any idea why it does this????
Link to comment
https://forums.phpfreaks.com/topic/30364-php-error_reporting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.