|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-12 19:57 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 18:00:01 2025 UTC |
Description: ------------ When attempting to catch an error with a set_error_handler function, it always misses a parse error. For example, when loading a php file, no matter if require, include, require_once..etc. is used, the default php bold errors are displayed when the function is ignored. Notice errors load fine, tho. I have not made any changes to php.ini-dist, and no modules. I'm running this on Apache 2.0.47. Reproduce code: --------------- <?php function error_handler($errno, $errstr, $errfile, $errline, $errctx) { echo "\nerror_handler:\n\terrno=$errno\n\terrstr=$errstr\n"; echo "\terrfile=$errfile\n\terrline=$errline\n"; die(); } set_error_handler("error_handler"); error_reporting(E_ALL); // load file with parse error include "error.php"; exit; ?> Expected result: ---------------- error_handler: errno=4 errstr=Parse error: parse error, unexpected ',', expecting ']' in error.php on line 65 errfile=error.php errline=1 Actual result: -------------- <b>Parse error: parse error, unexpected ',', expecting ']' in error.php on line 65</b>