Re: Fix division by zero to throw exception
| From: | Dmitry Stogov | Date: | Fri, 03 Apr 2015 19:50:58 +0000 |
| Subject: | Re: Fix division by zero to throw exception | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85723@lists.php.net to get a copy of this message | ||
On Fri, Apr 3, 2015 at 10:34 PM, Levi Morrison <levim@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.