|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-19 22:46 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 20:00:01 2025 UTC |
Short, sample function listed to quickly illustrate issue: [root@helpdesk bin]# more err.php <?php function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) { echo "USER ERROR HANDLER:"; echo " -- errno:$errno"; echo " -- errmsg:$errmsg"; echo " -- filename:$filename"; echo " -- linenum:$linenum"; echo "\n"; } $old_error_handler = set_error_handler("userErrorHandler"); trigger_error("E_USER_ERROR", E_USER_ERROR); trigger_error("E_USER_WARNING", E_USER_WARNING); trigger_error("E_USER_NOTICE", E_USER_NOTICE); this_function_does_not_exist(); ?> [root@helpdesk bin]# ./php -q err.php USER ERROR HANDLER: -- errno:256 -- errmsg:E_USER_ERROR -- filename:err.php -- linenum:13 USER ERROR HANDLER: -- errno:512 -- errmsg:E_USER_WARNING -- filename:err.php -- linenum:14 USER ERROR HANDLER: -- errno:1024 -- errmsg:E_USER_NOTICE -- filename:err.php -- linenum:15 <br> <b>Fatal error</b>: Call to undefined function: this_function_does_not_exist() in <b>err.php</b> on line <b>16</b><br> [root@helpdesk bin]#