3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '1.23456789012345678'; $b = 111111111111111111.9; var_dump('Length : ' . strlen($a), (float) $a, $a == (float) $a, $b, 'Missing 8 ' . json_encode(array($a), JSON_NUMERIC_CHECK));
Output for 8.0.0 - 8.0.12, 8.1rc1 - rc3
string(11) "Length : 19" float(1.2345678901234567) bool(true) float(1.111111111111111E+17) string(30) "Missing 8 [1.2345678901234567]"
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
string(11) "Length : 19" float(1.2345678901235) bool(true) float(1.1111111111111E+17) string(30) "Missing 8 [1.2345678901234567]"

preferences:
43.45 ms | 461 KiB | 5 Q