On 14 Jul 2014, at 16:07, Zeev Suraski <[email protected]> wrote:
> It does, as it creates an error (recoverable or not), and it doesn't allow
> "13abc" to easily turn into 13 (int), even if you implement an error
> handler that ignores E_RECOVERABLE_ERROR.
Actually, you’re right. In the current patch, if you run this:
set_error_handler(function () { return true; });
function foo(int $a) { var_dump($a); }
foo(“13abc”);
You would get this:
int(0)
However, that could easily be fixed so the error case uses the normal casting
behaviour.
--
Andrea Faulds
http://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php