At 20:28 19/12/2003, Christian Schneider wrote:
Zeev Suraski wrote:
argument 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;

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.


Zeev

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to