Re: [VOTE][RFC] Integer Semantics

From: Date: Tue, 16 Sep 2014 09:23:46 +0000
Subject: Re: [VOTE][RFC] Integer Semantics
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-77239@lists.php.net to get a copy of this message
On 16 Sep 2014, at 10:16, Dmitry Stogov <dmitry@zend.com> wrote: > Shifts by negative number may make sense. (N << -1) => (N >> 1) > At least receiving "false" from shift is not very pleasant. The problem is that changing from the current behaviour (undefined in C, but typically a shift by (PHP_INT_MAX - $bits)) to do what you’d expect (shift in the opposite direction) would be a silent BC break. I think it’s better to just stop it altogether and raise an E_WARNING, where it’s at least obvious something went wrong, than change this behaviour silently. > In the patch you use SIZEOF_LONG. It probably should be changed to > SIZEOF_ZEND_LONG. Will fix, thanks for spotting that. -- Andrea Faulds http://ajf.me/

« previous php.internals (#77239) next »