3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('precision', 100); $foo = PHP_INT_MAX * 2; $expectedString = sprintf("%d", $foo); if ($foo == $expectedString) { echo "true"; } else { //$expectedString = "1.844674407371E+19"; echo "$foo != ".$expectedString.PHP_EOL; $fooAsString = (string)$foo; if (strcmp($expectedString, $fooAsString) === 0) { echo "String representation is the same."; } }

preferences:
31.96 ms | 402 KiB | 5 Q