note 29103 added to function.set-error-handler

From: Date: Sun, 02 Feb 2003 19:48:43 +0000
Subject: note 29103 added to function.set-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-43294@lists.php.net to get a copy of this message
// If you have time to loose this function il a good example Class __TError{ Function Throw(){ trigger_error("Some very interesting error",E_USER_NOTICE); } } Class __TErrorManager{ Function ErrorCallBack($errno,$errmsg){ echo "Youpie ??"; } } Set_error_handler(array("__TErrorManager","ErrorCallBack")); // This code dosen't look bad // So let's do some test // First Test $a = new __TError(); $a->Throw(); for($i = 0;$i < 5;$i += 1) echo "I wana die"; // <-- This one fails // Second Test $a = new __TError(); $a->Throw(); // <-- This One is ok //Third Test __TError::Throw(); // <-- fails. If somebody's understand .. (Test on php4.3.0 on win32) -- http://www.php.net/manual/en/function.set-error-handler.php http://master.php.net/manage/user-notes.php?action=edit+29103 http://master.php.net/manage/user-notes.php?action=delete+29103 http://master.php.net/manage/user-notes.php?action=reject+29103

« previous php.notes (#43294) next »