At 17:54 09/06/2010, Ferenc Kovacs wrote:
If we introduce the E_TYPE what will be the new default/suggested error level?
If it won't be "enabled" by default, then maybe we could introduce this in the whole language. I mean, if you implicitly convert '123asd' to integer, you will trigger this error.

That's exactly what I had in mind. Have E_TYPE off by default and implement it throughout PHP - instead of just type hints.

for example:
$foo = 0;
$foo += (int)'123abc'; // no error
$foo += '123abc'; // E_TYPE

Exactly.  And to make sure we're on the same page:

$foo += '123';   // no error

Zeev

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

Reply via email to