3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = 1; for ($i = 2; $i < 100; $i++) { $x /= $i; } $str = (string) $x; ini_set("precision", 20); var_dump($x, $str, (float) $str);
based on Fn4cE
Output for 5.4.38 - 7.1.0
float(1.0715102881254668584E-156) string(20) "1.0715102881255E-156" float(1.0715102881254999801E-156)
Output for 4.3.5 - 5.4.37
Warning: ini_set() has been disabled for security reasons in /in/EeTdW on line 9 float(1.0715102881255E-156) string(20) "1.0715102881255E-156" float(1.0715102881255E-156)
Output for 4.3.1 - 4.3.4
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/EeTdW on line 9 float(1.0715102881255E-156) string(20) "1.0715102881255E-156" float(1.0715102881255E-156)
Output for 4.3.0
float(1.0715102881254683354E-156) string(20) "1.0715102881255E-156" float(1.0715102881254996436E-156)