The following piece of code
$i = 1;
$i *= 10;
echo $i;
prints -2123890688 on Mac OS X, and 0 on Windows.
The following commit is where breakage occured:
http://cvs.php.net/diff.php/Zend/zend_operators.c?r1=1.129.2.1&r2=1.129.2.2&ty=u
I suggest for this patch to be reverted since the commit message
reads "Speed up, simplify, use ZEND_SIGNED_MULTIPLY_LONG in
mul_operation" which doesn't sound like a bug fix that should be in
the stable branch.
Edin
This patch corrects the problem by not destroying the op1 value during
multiplication.
--Wez.
The following piece of code
$i = 1;
$i *= 10;
echo $i;prints -2123890688 on Mac OS X, and 0 on Windows.
The following commit is where breakage occured:
http://cvs.php.net/diff.php/Zend/zend_operators.c?r1=1.129.2.1&r2=1.129.2.2&ty=u
I suggest for this patch to be reverted since the commit message
reads "Speed up, simplify, use ZEND_SIGNED_MULTIPLY_LONG in
mul_operation" which doesn't sound like a bug fix that should be in
the stable branch.Edin
This patch corrects the problem by not destroying the op1 value during
multiplication.
Looks good to me.
- Sascha