giova...@giacobbi.net (Giovanni Giacobbi) wrote: > Also think about the possible upcoming changes to the Throwable definition, > I saw in another thread that you are thinking about dropping > Throwable::getCode(), which would make things even worse, in case of > something as simple as: > set_exception_handler(function($e) { print $e->getCode(); });
Don't be afraid, Giovanni, it was only my proposal to avoid another function returning "mixed", because just this was the issue: while in PHP 5 that method is expected to return a number, under PHP 7 it may now return anything, possibly something that you cannot pass to the "print" function whitout causing another error (printing an array generates a E_NOTICE an then only displays a bare "Array"); this means that you code above not only is useless (you are printing the "code" of what?) but it is also unsafe (it may generate another error, which is not a good thing). Regards, ___ /_|_\ Umberto Salsi \/_\/ www.icosaedro.it -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php