3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = function() { $p = 'abcde'; $c = 'abc'; var_export(substr($p, 0, strlen($c)) == $c, true); }; $s = microtime(1); for ($i =0; $i < 100; $i++) { $test(); } echo printf('%2f', microtime(1) - $s);
Output for 7.0.5, 7.1.0
0.0000278
Output for 7.0.14
0.0000318
Output for 7.0.12
0.0000198
Output for 7.0.6
0.0000158
Output for 7.0.4
0.0000288
Output for 7.0.1, 7.0.3
0.0000268
Output for 7.0.2
0.0000248
Output for 7.0.0
0.0000188
Output for 5.3.4, 5.3.14, 5.3.22, hhvm-3.12.0
0.0000608
Output for 5.3.1, 5.3.28, hhvm-3.10.0
0.0000698
Output for 5.6.28
0.0001008
Output for 5.6.21
0.0000958
Output for 5.6.20
0.0000868
Output for 5.4.5, 5.4.8 - 5.4.9, 5.4.11, 5.6.19
0.0000488
Output for 5.4.10, 5.4.14, 5.4.21, 5.6.18
0.0000518
Output for 5.3.5, 5.3.13, 5.3.26, 5.6.13, 5.6.17
0.0000568
Output for 5.6.14, 5.6.16
0.0000748
Output for 5.3.25, 5.4.26, 5.4.32, 5.4.39, 5.6.15
0.0000778
Output for 5.5.29, 5.5.32, 5.6.12
0.0000838
Output for 5.4.1, 5.6.8, 5.6.11
0.0000758
Output for 5.4.40, 5.6.10
0.0000648
Output for 5.5.28, 5.6.9
0.0000858
Output for 5.5.35
0.0000968
Output for 5.5.34
0.0001478
Output for 5.4.6 - 5.4.7, 5.4.12, 5.4.19 - 5.4.20, 5.5.33
0.0000498
Output for 5.3.2, 5.3.29, 5.5.31
0.0000728
Output for 5.5.30
0.0000678
Output for 5.4.24, 5.5.27
0.0000638
Output for 5.5.26
0.0000598
Output for 5.4.31, 5.4.36, 5.5.25
0.0000558
Output for 5.4.0, 5.5.24
0.0000908
Output for 5.4.13, 5.4.15 - 5.4.16, 5.4.18, 5.4.28, 5.4.34, 5.4.42, 5.4.45
0.0000508
Output for 5.4.41, 5.4.44
0.0000808
Output for 5.4.43
0.0000708
Output for 5.3.10, 5.3.15, 5.3.18 - 5.3.19, 5.3.23 - 5.3.24, 5.4.38
0.0000578
Output for 5.4.30, 5.4.37
0.0000738
Output for 5.4.3, 5.4.35
0.0000718
Output for 5.3.7, 5.4.23, 5.4.29
0.0000788
Output for 5.3.3, 5.3.6, 5.3.9, 5.3.11 - 5.3.12, 5.3.20 - 5.3.21, 5.3.27, 5.4.27
0.0000588
Output for 5.4.25
0.0000898
Output for 5.4.22
0.0000938
Output for 5.3.17, 5.4.17
0.0000548
Output for 5.4.2, 5.4.4
0.0000478
Output for 5.3.16
0.0001068
Output for 5.3.8
0.0000988
Output for 5.3.0
0.0000768
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/dmsHO on line 3
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/dmsHO on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/dmsHO on line 3
Process exited with code 255.