On 14 Jul 2014, at 16:46, Zeev Suraski <z...@zend.com> wrote:

> Actually there's a pretty simple way that's not strict type hints:
> 
> 5) Add type hints using existing syntax, which are casts;  Change casts
> (both existing and these new ones) to emit a new E_CAST in case of data
> loss or 'bogus' conversions.

How is emitting a new E_CAST useful? Most people are not going to write error 
handlers that will act on it, so it’ll just be an E_WARNING so far as most 
people care, and we’ll just end up with casts, which you can already do:

    function foo($a) {
        $a = (int)$a;
    }

--
Andrea Faulds
http://ajf.me/





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

Reply via email to