|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-16 11:39 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 00:00:01 2025 UTC |
I read in the documentation, that the set_error_handler function helps us to perform some actions when a critical error happens. I wrote an error handler function named myFunction and set set_error_handler("myFunction"), however it works only when a Notice or a Warning occurs. When a fatal error happens (to call an undefined function), the PHP error handler is executed: ------------------------------ <?php function myFunction($a,$b,$c,$d){ switch($a){ case 1: $a="Fatal error:";break; case 2: $a="Warning:";break; case 8: $a="Notice:"; } echo "<b>$a</b> $b iniside <b>$c</b> on line<b> $d</b>"; } set_error_handler("myFunction"); echo undef(); ?> ------------------------------ The settings in the php.ini file: ; log errors = On ; error_log = D:/inetpub/wwwroot/visit.txt ; error_log = syslog ; all three are disabled ...