note 76026 added to function.set-error-handler

From: Date: Wed, 27 Jun 2007 04:26:37 +0000
Subject: note 76026 added to function.set-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-128012@lists.php.net to get a copy of this message
Additional note based on some further testing: Although errcontext is effectively an array passed by reference to your custom error handling function, you cannot simply copy it over to another variable, because that variable will also act like a reference to errcontext, almost like an object. Instead, the only way I can find to copy the errcontext array to a separate variable so that you can actually modify its values without changing the surrounding variable context, is to copy it piece-by-piece with a foreach loop. Not the most efficient way of working, but then again, errors are hopefully exceptional enough for you that performance will not be an overriding concern in this case. ---- Server IP: 208.69.120.35 Probable Submitter: 68.163.129.98 ---- Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php Edit -- https://master.php.net/note/edit/76026 Del: integrated -- https://master.php.net/note/delete/76026/integrated Del: useless -- https://master.php.net/note/delete/76026/useless Del: bad code -- https://master.php.net/note/delete/76026/bad+code Del: spam -- https://master.php.net/note/delete/76026/spam Del: non-english -- https://master.php.net/note/delete/76026/non-english Del: in docs -- https://master.php.net/note/delete/76026/in+docs Del: other reasons-- https://master.php.net/note/delete/76026 Reject -- https://master.php.net/note/reject/76026 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128012) next »