note 76026 deleted from function.set-error-handler by cmb
| From: | cmb@php.net | Date: | Sun, 25 Aug 2019 08:57:25 +0000 |
| Subject: | note 76026 deleted from function.set-error-handler by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211987@lists.php.net to get a copy of this message | ||
Note Submitter: stepheneliotdewey at GmailDotCom
----
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.