3) One more problem is modulo :(

$ sapi/cli/php -n -r "var_dump(1 % 0);"

Warning: Division by zero in Command line code on line 1
bool(false)

Thanks. Dmitry.


On Fri, Apr 3, 2015 at 10:50 PM, Dmitry Stogov <dmi...@zend.com> wrote:

>
>
> On Fri, Apr 3, 2015 at 10:34 PM, Levi Morrison <le...@php.net> 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).
>>
>> Can you describe the weird behavior for shifts with negative offsets?
>>
>
> $ sapi/cli/php -n -r "var_dump(1 << -1);"
>
> Warning: Bit shift by negative number in Command line code on line 1
> bool(false)
>
> Currently this expression may also be evaluated at compile-time.
>
> Thanks. Dmitry.
>
>

Reply via email to