evilstrike Posted December 12, 2006 Share Posted December 12, 2006 I have a new install of php on solaris and I have this string error_reporting problem that I have never seenin my php.ini I have error_reporting = E_ALL & ~ E_NOTICEhere is the problem[code]<?phpecho "test";?>ouput: test<?phpecho "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<?phpecho "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 More sharing options...
Stooney Posted December 12, 2006 Share Posted December 12, 2006 If i'm right, the missing ; before the ?> is fine because it's the end of the script. In the second example, theres more script after the missing ; hence an error. Link to comment https://forums.phpfreaks.com/topic/30364-php-error_reporting/#findComment-139739 Share on other sites More sharing options...
evilstrike Posted December 12, 2006 Author Share Posted December 12, 2006 I thought it would be because of that, But I have never noticed this before though Has it always been like that? Link to comment https://forums.phpfreaks.com/topic/30364-php-error_reporting/#findComment-139743 Share on other sites More sharing options...
Stooney Posted December 12, 2006 Share Posted December 12, 2006 not sure, i've only been at php for a year Link to comment https://forums.phpfreaks.com/topic/30364-php-error_reporting/#findComment-139756 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.