3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php global $throw; $throw = false; function foo() { bar(); } function bar() { baz(); } function baz() { boom(); } function boom() { global $throw; if ($throw) { throw new RuntimeException(); } } function test($n) { for ($i = 0; $i < $n; $i++) { try { foo(); } catch (RuntimeException $e) { echo $e->getLine(); } } } $t = microtime(); test(100000); echo (microtime() - $t)/1000 . ' ms';
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/24ZCL on line 37 Notice: A non well formed numeric value encountered in /in/24ZCL on line 37 1.0907E-5 ms
Output for 7.0.14
1.738E-5 ms
Output for 7.0.12
1.5585E-5 ms
Output for 7.0.6
1.358E-5 ms
Output for 7.0.5
1.0638E-5 ms
Output for 7.0.4
9.319E-6 ms
Output for 7.0.3
8.229E-6 ms
Output for 7.0.2
8.2099999999999E-6 ms
Output for 7.0.1
8.51E-6 ms
Output for 7.0.0
8.184E-6 ms
Output for 5.6.28
3.4566E-5 ms
Output for 5.6.21
3.2779E-5 ms
Output for 5.6.20
3.2763E-5 ms
Output for 5.6.19
2.2213E-5 ms
Output for 5.6.18
2.1596E-5 ms
Output for 5.6.17
2.2344E-5 ms
Output for 5.6.16
-0.000977604 ms
Output for 5.6.15
2.2016E-5 ms
Output for 5.6.14
2.1289E-5 ms
Output for 5.6.13
2.1831E-5 ms
Output for 5.6.12
2.1653E-5 ms
Output for 5.6.11
2.8916E-5 ms
Output for 5.6.10
2.1071E-5 ms
Output for 5.6.9
2.1553E-5 ms
Output for 5.6.8
2.0839E-5 ms
Output for 5.6.7
2.1488E-5 ms
Output for 5.6.6
2.1179E-5 ms
Output for 5.6.5
2.1293E-5 ms
Output for 5.6.4
2.0068E-5 ms
Output for 5.6.3
2.2059E-5 ms
Output for 5.6.2
2.0088E-5 ms
Output for 5.6.1
2.0873E-5 ms
Output for 5.6.0
2.154E-5 ms
Output for 5.5.35
2.1383E-5 ms
Output for 5.5.34
2.1014E-5 ms
Output for 5.5.33
2.1008E-5 ms
Output for 5.5.32
2.0927E-5 ms
Output for 5.5.31
2.0564E-5 ms
Output for 5.5.30
2.0417E-5 ms
Output for 5.5.29
2.1273E-5 ms
Output for 5.5.28
3.0463E-5 ms
Output for 5.5.27
2.8442E-5 ms
Output for 5.5.26
2.0532E-5 ms
Output for 5.5.25
2.1068E-5 ms
Output for 5.5.24
2.1262E-5 ms
Output for 5.5.23
1.9289E-5 ms
Output for 5.5.22
1.9504E-5 ms
Output for 5.5.21
2.0319E-5 ms
Output for 5.5.20
2.0414E-5 ms
Output for 5.5.19
2.0329E-5 ms
Output for 5.5.18
2.073E-5 ms
Output for 5.5.16
1.9518E-5 ms
Output for 5.5.15
2.0101E-5 ms
Output for 5.5.14
2.048E-5 ms
Output for 5.5.13
2.0351E-5 ms
Output for 5.5.12
2.0123E-5 ms
Output for 5.5.11
2.0406E-5 ms
Output for 5.5.10
-0.000978949 ms
Output for 5.5.9
2.0529E-5 ms
Output for 5.5.8
2.0895E-5 ms
Output for 5.5.7
2.0737E-5 ms
Output for 5.5.6
2.1307E-5 ms
Output for 5.5.5
2.1033E-5 ms
Output for 5.5.4
2.029E-5 ms
Output for 5.5.3
2.3492E-5 ms
Output for 5.5.2
2.0821E-5 ms
Output for 5.5.1
2.7273E-5 ms
Output for 5.5.0
1.989E-5 ms
Output for 5.4.45
2.0554E-5 ms
Output for 5.4.44
2.3338E-5 ms
Output for 5.4.43
2.0342E-5 ms
Output for 5.4.42
2.052E-5 ms
Output for 5.4.41
2.0582E-5 ms
Output for 5.4.40
2.0421E-5 ms
Output for 5.4.39
2.2219E-5 ms
Output for 5.4.38
2.162E-5 ms
Output for 5.4.37
2.1507E-5 ms
Output for 5.4.36
2.1686E-5 ms
Output for 5.4.35
2.2295E-5 ms
Output for 5.4.34
2.1689E-5 ms
Output for 5.4.32
2.025E-5 ms
Output for 5.4.31
2.131E-5 ms
Output for 5.4.30
2.1228E-5 ms
Output for 5.4.29
2.1217E-5 ms
Output for 5.4.28
2.4033E-5 ms
Output for 5.4.27
2.458E-5 ms
Output for 5.4.26
2.3593E-5 ms
Output for 5.4.25
2.2982E-5 ms
Output for 5.4.24
2.2699E-5 ms
Output for 5.4.23
2.2153E-5 ms
Output for 5.4.22
2.1597E-5 ms
Output for 5.4.21
2.1865E-5 ms
Output for 5.4.20
3.0288E-5 ms
Output for 5.4.19
2.2268E-5 ms
Output for 5.4.18
2.0037E-5 ms
Output for 5.4.17
3.4705E-5 ms
Output for 5.4.16
2.1129E-5 ms
Output for 5.4.15
2.0252E-5 ms
Output for 5.4.14
2.0304E-5 ms
Output for 5.4.13
2.0585E-5 ms
Output for 5.4.12
2.0488E-5 ms
Output for 5.4.11
2.0992E-5 ms
Output for 5.4.10
2.0179E-5 ms
Output for 5.4.9
2.1128E-5 ms
Output for 5.4.8
2.5138E-5 ms
Output for 5.4.7
2.3392E-5 ms
Output for 5.4.6
-0.000971391 ms
Output for 5.4.5
2.0565E-5 ms
Output for 5.4.4
1.9819E-5 ms
Output for 5.4.3
2.2969E-5 ms
Output for 5.4.2
2.2261E-5 ms
Output for 5.4.1
2.2365E-5 ms
Output for 5.4.0
2.0452E-5 ms
Output for 5.3.29
4.592E-5 ms
Output for 5.3.28
4.7787E-5 ms
Output for 5.3.27
4.8093E-5 ms
Output for 5.3.26
4.5796E-5 ms
Output for 5.3.25
4.585E-5 ms
Output for 5.3.24
4.587E-5 ms
Output for 5.3.23
4.7088E-5 ms
Output for 5.3.22
-0.00095318 ms
Output for 5.3.21
4.517E-5 ms
Output for 5.3.20
4.6796E-5 ms
Output for 5.3.19
4.6276E-5 ms
Output for 5.3.18
4.628E-5 ms
Output for 5.3.17
6.5508E-5 ms
Output for 5.3.16
4.663E-5 ms
Output for 5.3.15
4.6985E-5 ms
Output for 5.3.14
4.9503E-5 ms
Output for 5.3.13
4.6545E-5 ms
Output for 5.3.12
4.6541E-5 ms
Output for 5.3.11
4.8534E-5 ms
Output for 5.3.10
4.8128E-5 ms
Output for 5.3.9
4.6387E-5 ms
Output for 5.3.8
4.7789E-5 ms
Output for 5.3.7
4.7837E-5 ms
Output for 5.3.6
4.558E-5 ms
Output for 5.3.5
4.5154E-5 ms
Output for 5.3.4
4.548E-5 ms
Output for 5.3.3
4.516E-5 ms
Output for 5.3.2
4.574E-5 ms
Output for 5.3.1
4.7242E-5 ms
Output for 5.3.0
4.7226E-5 ms
Output for 5.2.17
6.4308E-5 ms
Output for 5.2.16
6.5571E-5 ms
Output for 5.2.15
6.5899E-5 ms
Output for 5.2.14
6.6711E-5 ms
Output for 5.2.13
6.7738E-5 ms
Output for 5.2.12
6.7651E-5 ms
Output for 5.2.11
6.8069E-5 ms
Output for 5.2.10
6.688E-5 ms
Output for 5.2.9
6.7279E-5 ms
Output for 5.2.8
6.9464E-5 ms
Output for 5.2.7
6.8597E-5 ms
Output for 5.2.6
6.8212E-5 ms
Output for 5.2.5
6.8012E-5 ms
Output for 5.2.4
6.7352E-5 ms
Output for 5.2.3
-0.000932926 ms
Output for 5.2.2
6.6926E-5 ms
Output for 5.2.1
6.6609E-05 ms
Output for 5.2.0
7.2343E-05 ms
Output for 5.1.6
7.1351E-05 ms
Output for 5.1.5
7.272E-05 ms
Output for 5.1.4
7.208E-05 ms
Output for 5.1.3
7.03E-05 ms
Output for 5.1.2
7.1074E-05 ms
Output for 5.1.1
7.3576E-05 ms
Output for 5.1.0
8.2542E-05 ms
Output for 5.0.0 - 5.0.5
Fatal error: Class 'RuntimeException' not found in /in/24ZCL on line 29
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/24ZCL on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/24ZCL on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/24ZCL on line 21
Process exited with code 255.