3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = array(1.0, 0.0000000001, 1e300, 1e-100, 1/3, 1-1/3, 8/9, 1-8/9); array_walk($v, function($i) { echo $i . "\n" . json_encode($i) . "\n" . var_export($i) . "\n\n"; });
Output for 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
1.01 1 1.0E-101.0E-10 1.0e-10 1.0E+3001.0E+300 1.0e+300 1.0E-1001.0E-100 1.0e-100 0.33333333333333330.33333333333333 0.3333333333333333 0.66666666666666670.66666666666667 0.6666666666666667 0.88888888888888880.88888888888889 0.8888888888888888 0.111111111111111160.11111111111111 0.11111111111111116
Output for 7.0.14 - 7.0.20
1.01 1 1.0E-101.0E-10 1.0e-10 1.0000000000000001E+3001.0E+300 1.0e+300 1.0E-1001.0E-100 1.0e-100 0.333333333333333310.33333333333333 0.33333333333333 0.666666666666666740.66666666666667 0.66666666666667 0.888888888888888840.88888888888889 0.88888888888889 0.111111111111111160.11111111111111 0.11111111111111
Output for 7.0.2 - 7.0.9
1.01 1 1.0000000000000000364322E-101.0E-10 1.0e-10 1.00000000000000005250476E+3001.0E+300 1.0e+300 1.0000000000000000199919E-1001.0E-100 1.0e-100 0.3333333333333333148296160.33333333333333 0.33333333333333 0.6666666666666667406815350.66666666666667 0.66666666666667 0.8888888888888888395456430.88888888888889 0.88888888888889 0.1111111111111111604543570.11111111111111 0.11111111111111
Output for 5.4.22 - 5.4.45, 5.5.6 - 5.5.38, 5.6.0 - 5.6.24, 7.0.0 - 7.0.1
11 1 1.0000000000000000364322E-101.0E-10 1.0e-10 1.00000000000000005250476E+3001.0E+300 1.0e+300 1.0000000000000000199919E-1001.0E-100 1.0e-100 0.3333333333333333148296160.33333333333333 0.33333333333333 0.6666666666666667406815350.66666666666667 0.66666666666667 0.8888888888888888395456430.88888888888889 0.88888888888889 0.1111111111111111604543570.11111111111111 0.11111111111111
Output for 5.6.28
11 1 1.0E-101.0E-10 1.0e-10 1.0000000000000001E+3001.0E+300 1.0e+300 1.0E-1001.0E-100 1.0e-100 0.333333333333333310.33333333333333 0.33333333333333 0.666666666666666740.66666666666667 0.66666666666667 0.888888888888888840.88888888888889 0.88888888888889 0.111111111111111160.11111111111111 0.11111111111111
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.21, 5.5.0 - 5.5.5
11 1 1.0E-101.0E-10 1.0e-10 1.0E+3001.0E+300 1.0e+300 1.0E-1001.0E-100 1.0e-100 0.333333333333330.33333333333333 0.33333333333333 0.666666666666670.66666666666667 0.66666666666667 0.888888888888890.88888888888889 0.88888888888889 0.111111111111110.11111111111111 0.11111111111111
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/sZjLd on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/sZjLd on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/sZjLd on line 5
Process exited with code 255.

preferences:
218.24 ms | 401 KiB | 368 Q