given the following script
<?php
ini_set('display_errors','On');
error_reporting(E_ALL);
thisisanerror
?>
I get the expected
Notice: Use of undefined constant error - assumed 'error' in /htdocs/test.php on line 8
but if I add something to the script
<?php
ini_set('display_errors','On');
error_reporting(E_ALL);
error
function test () {
echo('test');
}
?>
I get
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
Why am I getting a 500 error instead of a normal syntax error in the latter case? Shouldn't display_errors always display the error?