Re: error_handler
| From: | Zeev Suraski | Date: | Fri, 19 Dec 2003 23:00:02 +0000 |
| Subject: | Re: error_handler | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6639@lists.php.net to get a copy of this message | ||
At 20:28 19/12/2003, Christian Schneider wrote:
Zeev Suraski wrote:Hrm, you're absolutely right, I erroneously mixed built-in and userspace function behavior. But my answer still stands - I still think that adding an extra argument is still the best solution, and that forward-compatibility ranks far below functionality in terms of importance. Sorry for the messup though. Zeevargument makes a great deal of sense. As a matter of fact, in practice - you can easily get forward-compatibility. Just supply it in both PHP 4 and 5 - extra arguments are ignored anyway (just provide @ to make sure of that).Just checked it and no: set_error_handler does _not_ ignore the additional parameter, it fails and does _not_ install the handler on PHP4. Leave out E_ALL and it works like a charm. Am I missing something here? Script used to test: function handler() {echo "error!\n";} @set_error_handler("handler", E_ALL); $a / 0;