3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array(1.0, 1.111111111111111111, 1/3, 1e300, 1e-300); array_walk($x, function($v) { echo "$v" . PHP_EOL; echo json_encode($v) . PHP_EOL; echo PHP_EOL; });
based on l7nUO
Output for 7.1.0
1 1 1.1111111111111 1.1111111111111112 0.33333333333333 0.3333333333333333 1.0E+300 1.0e+300 1.0E-300 1.0e-300
Output for 5.3.0 - 7.0.14
1 1 1.1111111111111 1.1111111111111 0.33333333333333 0.33333333333333 1.0E+300 1.0e+300 1.0E-300 1.0e-300
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/diS55 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/diS55 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/diS55 on line 4
Process exited with code 255.