3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set("precision", "16"); $f = 1234567890123456789.0; $s = (string)$f; var_dump($f, $s, $f == $s);
Output for 5.2.7 - 5.6.28, 7.0.0 - 7.1.0
float(1.234567890123457E+18) string(21) "1.234567890123457E+18" bool(false)
Output for hhvm-3.10.0 - 3.12.0
float(1.2345678901235E+18) string(19) "1.2345678901235E+18" bool(false)
Output for 5.2.2 - 5.2.6
float(1234567890123457000) string(19) "1234567890123457000" bool(false)
Output for 4.3.0 - 5.2.1
float(1234567890123457000) string(21) "1.234567890123457E+18" bool(false)