Posted by fritz-bayer@web.de on 11/18/28 11:41
Thanks Dana and thanks to rest of the people who responded.
I have debug both scripts an figured out that the program breaks, when
it's processing the values
a=5496229061, b=13
The php script returns 146638 and the perl script 524287. So also the
operation $a = ($a >> $b) yields different values in php and perl.
Or could it be, that php is smart enough to create a unsigned integer,
wheras perl does not and therefore an overflow occurs? Anyway here you
have the possibiliy of an overflow depending on how $a is handled.
Do you think >> differs in perl and php or is it an overflow problem?
[Back to original message]
|