I have a strange mistake. See Code
$val1 = pow(2, 64);
$val2 = $val1 - 1;
echo number_format($val1, 0, '', '') . "<br/>";
echo number_format($val2, 0, '', '') . "<br/>";
and his way out
18446744073709551616
18446744073709551616
Why does $ val2 have a value of 18446744073709551616 when should it be 18446744073709551615?
source
share