2 ms·
The result they are showing is clearly on a 64bit machine, my 32bit windows php overflows into a signed integer. I posted initially with casting (int) $i but I
by ck2 13y ago
The result they are showing is clearly on a 64bit machine, my 32bit windows php overflows into a signed integer.
I posted initially with casting (int) $i but I tested it without and it worked too.
In fact on my 64bit centos machine PHP 5.4 doesn't need the cast at all and the original code gives the correct result the first time as is.