Its easy to display php errors
test.php for testing work php error
//output error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\test.php on line 7
test.php for testing work php error
echo "test"
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//output error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\test.php on line 7
Inside your php.ini:
display_errors = on
Then restart your web server.
/*
This always works :
ini_set('display_errors', 1);
ini_set('display_startup_ errors', 1);
error_reporting(E_ALL);
However, this doesn't make PHP to show parse errors - the only way to show those errors is to modify your php.ini with this line:
display_errors = on
*/