3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = 0b1111111111111111111111111111111111111111111111111111111111111111; var_dump($n); var_dump(sprintf("%.16E", $n)); var_dump(sprintf("%.17E", $n)); var_dump(sprintf("%.16G", $n)); var_dump(sprintf("%.17G", $n)); var_dump(sprintf("%.18G", $n));
Output for 5.4.10 - 7.2.8
float(1.844674407371E+19) string(22) "1.8446744073709550E+19" string(23) "1.84467440737095496E+19" string(21) "1.844674407370955E+19" string(21) "1.844674407370955E+19" string(23) "1.84467440737095496E+19"
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/dIUTg on line 2
Process exited with code 255.