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 microtime(1) - $s;
Output for 7.1.0
3.7908554077148E-5
Output for 7.0.14
3.0040740966797E-5
Output for 7.0.6
2.7894973754883E-5
Output for 7.0.5
2.3126602172852E-5
Output for 7.0.4
1.8835067749023E-5
Output for 7.0.1, 7.0.3
2.5033950805664E-5
Output for 7.0.2
1.9073486328125E-5
Output for 7.0.0
1.8119812011719E-5
Output for 5.6.28
9.9897384643555E-5
Output for 5.6.12, 5.6.21
5.6028366088867E-5
Output for 5.3.3, 5.3.18, 5.4.34, 5.4.44, 5.6.20
9.1075897216797E-5
Output for 5.6.19
4.9829483032227E-5
Output for 5.6.18
5.0067901611328E-5
Output for 5.6.17
7.2002410888672E-5
Output for 5.4.2, 5.6.14, 5.6.16
8.702278137207E-5
Output for 5.6.9, 5.6.15
8.2015991210938E-5
Output for 5.6.13
5.9843063354492E-5
Output for 5.4.1, 5.4.12, 5.6.11
8.6069107055664E-5
Output for 5.4.17, 5.5.32, 5.6.10
8.1062316894531E-5
Output for 5.6.8
9.0122222900391E-5
Output for 5.5.27, 5.5.34, 5.6.7
5.6982040405273E-5
Output for 5.4.4, 5.4.9, 5.5.35
8.2969665527344E-5
Output for 5.5.33
6.1988830566406E-5
Output for 5.5.31
5.5074691772461E-5
Output for 5.5.30
5.8174133300781E-5
Output for 5.3.22, 5.5.26, 5.5.29
8.8930130004883E-5
Output for 5.5.28
8.0108642578125E-5
Output for 5.5.25
5.4121017456055E-5
Output for 5.5.24
0.00014495849609375
Output for 5.4.45
4.1007995605469E-5
Output for 5.4.29, 5.4.43
6.6995620727539E-5
Output for 5.4.26, 5.4.42
6.7949295043945E-5
Output for 5.4.21, 5.4.41
6.4849853515625E-5
Output for 5.3.11, 5.4.40
9.5129013061523E-5
Output for 5.3.5, 5.3.10, 5.4.39
9.2029571533203E-5
Output for 5.4.38
9.3221664428711E-5
Output for 5.4.37
0.00011420249938965
Output for 5.4.36
8.9168548583984E-5
Output for 5.3.28, 5.4.35
9.7990036010742E-5
Output for 5.4.32
6.103515625E-5
Output for 5.4.22, 5.4.27, 5.4.31
6.6041946411133E-5
Output for 5.4.30
7.0095062255859E-5
Output for 5.4.20, 5.4.28
6.9856643676758E-5
Output for 5.4.16, 5.4.25
7.6055526733398E-5
Output for 5.4.24
6.9141387939453E-5
Output for 5.4.15, 5.4.23
7.8916549682617E-5
Output for 5.3.15, 5.4.19
9.8943710327148E-5
Output for 5.4.0, 5.4.18
8.1777572631836E-5
Output for 5.4.14
0.0001060962677002
Output for 5.4.13
7.7962875366211E-5
Output for 5.4.11
8.5830688476562E-5
Output for 5.4.7, 5.4.10
8.4877014160156E-5
Output for 5.4.8
0.00014185905456543
Output for 5.4.6
9.2983245849609E-5
Output for 5.4.5
8.9883804321289E-5
Output for 5.4.3
8.4161758422852E-5
Output for 5.3.29
7.9870223999023E-5
Output for 5.3.27
0.00010514259338379
Output for 5.3.26
8.8214874267578E-5
Output for 5.3.25
9.4175338745117E-5
Output for 5.3.9, 5.3.24
9.1791152954102E-5
Output for 5.3.23
0.00010895729064941
Output for 5.3.21
0.00010919570922852
Output for 5.3.20
0.00013089179992676
Output for 5.3.19
9.3936920166016E-5
Output for 5.3.6, 5.3.17
9.4890594482422E-5
Output for 5.3.16
0.00010085105895996
Output for 5.3.14
9.608268737793E-5
Output for 5.3.13
9.5844268798828E-5
Output for 5.3.12
9.7036361694336E-5
Output for 5.3.8
0.00016117095947266
Output for 5.3.7
0.00014686584472656
Output for 5.3.4
0.00011301040649414
Output for 5.3.2
0.00012493133544922
Output for 5.3.1
0.00012588500976562
Output for 5.3.0
0.0001368522644043
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/OpGHG 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/OpGHG on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/OpGHG on line 3
Process exited with code 255.