Hi Dmitry,

> On 3 Apr 2015, at 20:04, Dmitry Stogov <dmi...@zend.com> wrote:
> 
> 2) Very similar weird behavior was introduced for shift with negative 
> offsets. I also propose to change it in the same way (Fatal error at 
> compile-time, Exception in run-time).
> 
> Any thoughts? objections?

For consistency with IEEE 754, shouldn't we produce INF on a division by zero, 
at least for floats (but probably integers too because of weak typing)? I don't 
think producing a warning is an issue, but FALSE isn't the right value to 
produce.

However there should be a compile-time solution. Maybe, if a division by zero 
happens, don't evaluate the expression at compile-time?

Thanks.

--
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