You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the following code should echo FOUND after 1 attempt(s) ,
and it works as expected in 32bit php, but in 64bit php it echos FOUND after 513 attempt(s)
for($i = PHP_INT_MAX; $i > 0; -- $i) {
if (! is_float ( ShortURL::decode ( ShortURL::encode ( $i ) ) )) {
//var_dump ( $i );
die ( 'FOUND after '.((PHP_INT_MAX-$i)+1).' attempt(s)' );
}
}
die ( 'NOT FOUND' );
The text was updated successfully, but these errors were encountered:
divinity76
changed the title
in 64bit php, everything between 9223372036854775296 - PHP_INT_MAX is returned as float
in 64bit php, everything between 0x7ffffffffffffe00 - PHP_INT_MAX is returned as float
Oct 23, 2016
divinity76
changed the title
in 64bit php, everything between 0x7ffffffffffffe00 - PHP_INT_MAX is returned as float
in 64bit php, everything between 0x7ffffffffffffE00 - PHP_INT_MAX is returned as float
Oct 23, 2016
We should definitely do something to find out the limit, as I said in #7, but I think what you did is the wrong direction, isn't it? You found the largest number, other than PHP_INT_MAX in 64-bit PHP, that doesn't work. But what we need is actually the smallest such number, which requires much more computing power or time.
the following code should echo
FOUND after 1 attempt(s)
,and it works as expected in 32bit php, but in 64bit php it echos
FOUND after 513 attempt(s)
The text was updated successfully, but these errors were encountered: