3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = function($p = 'abcde', $c = 'abc') { return substr($p, 0, strlen($c)) == $c; }; $test1 = function($p = 'abcde', $c = 'abc') { return strncmp($p, $c, strlen($c)); }; $print = function($closure, $s, $cycles = 100000) { for ($i =0; $i < $cycles; $i++) { $closure(); } echo printf('Runns: %.6f', microtime(1) - $s); echo PHP_EOL; }; $print($test, microtime(1)); $print($test1, microtime(1));
Output for 7.1.0
Runns: 0.01440015 Runns: 0.01891115
Output for 7.0.14
Runns: 0.01545915 Runns: 0.01958015
Output for 7.0.6
Runns: 0.00849315 Runns: 0.01056715
Output for 7.0.5
Runns: 0.01194915 Runns: 0.01381615
Output for 7.0.4
Runns: 0.01228615 Runns: 0.01467915
Output for 7.0.3
Runns: 0.01007915 Runns: 0.01121115
Output for 7.0.2
Runns: 0.00851115 Runns: 0.00945815
Output for 7.0.1
Runns: 0.01042115 Runns: 0.01045215
Output for 7.0.0
Runns: 0.00863715 Runns: 0.00961615
Output for hhvm-3.12.0
Runns: 0.02723115 Runns: 0.02401915
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
Runns: 0.05912415 Runns: 0.01900415
Output for 5.6.21
Runns: 0.03746615 Runns: 0.03289315
Output for 5.6.20
Runns: 0.05193315 Runns: 0.03454415
Output for 5.6.19
Runns: 0.03867015 Runns: 0.02780615
Output for 5.6.18
Runns: 0.03219315 Runns: 0.02727115
Output for 5.6.17
Runns: 0.03853115 Runns: 0.03280815
Output for 5.6.16
Runns: 0.03791615 Runns: 0.03279215
Output for 5.6.15
Runns: 0.04143815 Runns: 0.03249515
Output for 5.6.14
Runns: 0.05260415 Runns: 0.03891515
Output for 5.6.13
Runns: 0.03925415 Runns: 0.03257515
Output for 5.6.12
Runns: 0.05308515 Runns: 0.03851415
Output for 5.6.11
Runns: 0.04198215 Runns: 0.03283615
Output for 5.6.10
Runns: 0.04892715 Runns: 0.03560715
Output for 5.6.9
Runns: 0.05370215 Runns: 0.03847315
Output for 5.6.8
Runns: 0.03953915 Runns: 0.03282815
Output for 5.6.7
Runns: 0.03892615 Runns: 0.03364815
Output for 5.5.35
Runns: 0.05566215 Runns: 0.03726915
Output for 5.5.34
Runns: 0.05210615 Runns: 0.04129415
Output for 5.5.33
Runns: 0.03641215 Runns: 0.02883715
Output for 5.5.32
Runns: 0.04733215 Runns: 0.03542015
Output for 5.5.31
Runns: 0.04063415 Runns: 0.03436015
Output for 5.5.30
Runns: 0.05467215 Runns: 0.03480915
Output for 5.5.29
Runns: 0.04990315 Runns: 0.03472915
Output for 5.5.28
Runns: 0.05081715 Runns: 0.05268815
Output for 5.5.27
Runns: 0.03959015 Runns: 0.03376115
Output for 5.5.26
Runns: 0.03897415 Runns: 0.03427015
Output for 5.5.25
Runns: 0.05145015 Runns: 0.03868215
Output for 5.5.24
Runns: 0.04719915 Runns: 0.03525315
Output for 5.4.45
Runns: 0.05742315 Runns: 0.05725515
Output for 5.4.44
Runns: 0.10578715 Runns: 0.05133815
Output for 5.4.43
Runns: 0.05811515 Runns: 0.05103715
Output for 5.4.42
Runns: 0.06286515 Runns: 0.05003215
Output for 5.4.41
Runns: 0.05901515 Runns: 0.05109515
Output for 5.4.40
Runns: 0.09224415 Runns: 0.09483315
Output for 5.4.39
Runns: 0.06330015 Runns: 0.06421615
Output for 5.4.38
Runns: 0.06179115 Runns: 0.05828415
Output for 5.4.37
Runns: 0.06103115 Runns: 0.05118515
Output for 5.4.36
Runns: 0.06477715 Runns: 0.05397815
Output for 5.4.35
Runns: 0.09067415 Runns: 0.05781715
Output for 5.4.34
Runns: 0.05592515 Runns: 0.05687815
Output for 5.4.32
Runns: 0.04001015 Runns: 0.03694215
Output for 5.4.31
Runns: 0.04023915 Runns: 0.03908215
Output for 5.4.30
Runns: 0.04736815 Runns: 0.03893715
Output for 5.4.29
Runns: 0.04555315 Runns: 0.03793515
Output for 5.4.28
Runns: 0.04280415 Runns: 0.03873415
Output for 5.4.27
Runns: 0.04452715 Runns: 0.03725715
Output for 5.4.26
Runns: 0.04279915 Runns: 0.03755315
Output for 5.4.25
Runns: 0.04238415 Runns: 0.03880215
Output for 5.4.24
Runns: 0.04389815 Runns: 0.03699215
Output for 5.4.23
Runns: 0.04333715 Runns: 0.03828015
Output for 5.4.22
Runns: 0.04000815 Runns: 0.03855115
Output for 5.4.21
Runns: 0.04252615 Runns: 0.03813215
Output for 5.4.20
Runns: 0.04946115 Runns: 0.04018915
Output for 5.4.19
Runns: 0.04947015 Runns: 0.04381115
Output for 5.4.18
Runns: 0.04983015 Runns: 0.04356415
Output for 5.4.17
Runns: 0.11582015 Runns: 0.04773415
Output for 5.4.16
Runns: 0.04767215 Runns: 0.05243515
Output for 5.4.15
Runns: 0.05852515 Runns: 0.04252315
Output for 5.4.14
Runns: 0.04731415 Runns: 0.04388815
Output for 5.4.13
Runns: 0.11108415 Runns: 0.04535615
Output for 5.4.12
Runns: 0.05129515 Runns: 0.04594415
Output for 5.4.11
Runns: 0.04773615 Runns: 0.04102815
Output for 5.4.10
Runns: 0.04597615 Runns: 0.04107315
Output for 5.4.9
Runns: 0.04827715 Runns: 0.04420215
Output for 5.4.8
Runns: 0.04810015 Runns: 0.04324115
Output for 5.4.7
Runns: 0.04861815 Runns: 0.04698615
Output for 5.4.6
Runns: 0.05247715 Runns: 0.04268415
Output for 5.4.5
Runns: 0.05179615 Runns: 0.04262515
Output for 5.4.4
Runns: 0.04750015 Runns: 0.04158915
Output for 5.4.3
Runns: 0.04830715 Runns: 0.04407515
Output for 5.4.2
Runns: 0.04667915 Runns: 0.07237815
Output for 5.4.1
Runns: 0.04774015 Runns: 0.04551015
Output for 5.4.0
Runns: 0.04974115 Runns: 0.04252715
Output for 5.3.29
Runns: 0.05784315 Runns: 0.04764415
Output for 5.3.28
Runns: 0.04938215 Runns: 0.04600915
Output for 5.3.27
Runns: 0.05708015 Runns: 0.08274915
Output for 5.3.26
Runns: 0.05604415 Runns: 0.05412315
Output for 5.3.25
Runns: 0.05758815 Runns: 0.05580715
Output for 5.3.24
Runns: 0.05569815 Runns: 0.05427615
Output for 5.3.23
Runns: 0.05875115 Runns: 0.05269315
Output for 5.3.22
Runns: 0.05477215 Runns: 0.05161115
Output for 5.3.21
Runns: 0.06428715 Runns: 0.05853315
Output for 5.3.20
Runns: 0.08703215 Runns: 0.05053215
Output for 5.3.19
Runns: 0.06459415 Runns: 0.05294615
Output for 5.3.18
Runns: 0.05829115 Runns: 0.05249815
Output for 5.3.17
Runns: 0.09997115 Runns: 0.05954215
Output for 5.3.16
Runns: 0.06424215 Runns: 0.05241215
Output for 5.3.15
Runns: 0.06169815 Runns: 0.05663115
Output for 5.3.14
Runns: 0.05730315 Runns: 0.05659415
Output for 5.3.13
Runns: 0.05794715 Runns: 0.05434615
Output for 5.3.12
Runns: 0.05817315 Runns: 0.05264815
Output for 5.3.11
Runns: 0.05709615 Runns: 0.05242815
Output for 5.3.10
Runns: 0.09006115 Runns: 0.05153215
Output for 5.3.9
Runns: 0.05746315 Runns: 0.05289315
Output for 5.3.8
Runns: 0.05927515 Runns: 0.05320115
Output for 5.3.7
Runns: 0.05973815 Runns: 0.14481015
Output for 5.3.6
Runns: 0.06037915 Runns: 0.05065915
Output for 5.3.5
Runns: 0.08572815 Runns: 0.05252315
Output for 5.3.4
Runns: 0.05762915 Runns: 0.04905415
Output for 5.3.3
Runns: 0.05830815 Runns: 0.05270115
Output for 5.3.2
Runns: 0.05796415 Runns: 0.04966715
Output for 5.3.1
Runns: 0.06539915 Runns: 0.05379915
Output for 5.3.0
Runns: 0.05346415 Runns: 0.04986615
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/ioDM3 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/ioDM3 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ioDM3 on line 3
Process exited with code 255.