note 93261 added to function.restore-error-handler

From: Date: Mon, 31 Aug 2009 11:23:26 +0000
Subject: note 93261 added to function.restore-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-160078@lists.php.net to get a copy of this message
While looking through some old code I found this trick I once used for restoring the built-in error handler: <?php // Unwind the error handler stack until we're back at the built-in error handler. function unset_error_handler() { while (set_error_handler(create_function('$errno,$errstr', 'return false;'))) { // Unset the error handler we just set. restore_error_handler(); // Unset the previous error handler. restore_error_handler(); } // Restore the built-in error handler. restore_error_handler(); } ?> ---- Server IP: 213.249.64.162 Probable Submitter: 213.84.154.21 ---- Manual Page -- http://www.php.net/manual/en/function.restore-error-handler.php Edit -- https://master.php.net/note/edit/93261 Del: integrated -- https://master.php.net/note/delete/93261/integrated Del: useless -- https://master.php.net/note/delete/93261/useless Del: bad code -- https://master.php.net/note/delete/93261/bad+code Del: spam -- https://master.php.net/note/delete/93261/spam Del: non-english -- https://master.php.net/note/delete/93261/non-english Del: in docs -- https://master.php.net/note/delete/93261/in+docs Del: other reasons-- https://master.php.net/note/delete/93261 Reject -- https://master.php.net/note/reject/93261 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160078) next »