3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { public static function bar($x,$y){ return $x*$y; } } $s = microtime(true); $met = 'bar'; for($x = 0; $x < 100000; $x++ ){ call_user_func(array('foo', $met), 10,20); } echo round(microtime(true) - $s,5)."\n"; $s = microtime(true); $met = 'bar'; for($x = 0; $x < 100000; $x++ ){ foo::{$met}(10,20); } echo round(microtime(true) - $s,5)."\n";
Output for 7.1.0
0.02093 0.00649
Output for 7.0.14
0.02044 0.00688
Output for 7.0.6
0.01638 0.00511
Output for 7.0.5
0.0128 0.0044
Output for 7.0.4
0.01821 0.00616
Output for 7.0.3
0.01854 0.00609
Output for 7.0.2
0.01894 0.00621
Output for 7.0.1
0.01751 0.00503
Output for 7.0.0
0.01761 0.00604
Output for hhvm-3.12.0
0.02673 0.01839
Output for hhvm-3.10.0
0.03061 0.02201
Output for 5.6.28
0.06831 0.02162
Output for 5.6.21
0.06076 0.02295
Output for 5.6.20
0.04468 0.02021
Output for 5.6.19
0.05213 0.01707
Output for 5.6.18
0.04859 0.01704
Output for 5.6.17
0.05673 0.01648
Output for 5.6.16
0.04854 0.01477
Output for 5.6.15
0.04369 0.01447
Output for 5.6.14
0.05044 0.01477
Output for 5.6.13
0.05874 0.01646
Output for 5.6.12
0.05791 0.01631
Output for 5.6.11
0.05756 0.01617
Output for 5.6.10
0.06142 0.01728
Output for 5.6.9
0.04335 0.01405
Output for 5.6.8
0.04497 0.01378
Output for 5.6.7
0.04503 0.01407
Output for 5.6.6
0.05238 0.01509
Output for 5.6.5
0.05509 0.01524
Output for 5.6.4
0.05172 0.01473
Output for 5.6.3
0.05273 0.01573
Output for 5.6.2
0.05778 0.01614
Output for 5.6.1
0.0558 0.01568
Output for 5.6.0
0.05691 0.01631
Output for 5.5.35
0.04382 0.01908
Output for 5.5.34
0.08307 0.0282
Output for 5.5.33
0.06153 0.01719
Output for 5.5.32
0.04969 0.01454
Output for 5.5.31
0.04987 0.01451
Output for 5.5.30
0.04984 0.01442
Output for 5.5.29
0.05207 0.01494
Output for 5.5.28
0.05623 0.01624
Output for 5.5.27
0.05295 0.01398
Output for 5.5.26
0.05491 0.01603
Output for 5.5.25
0.04475 0.0139
Output for 5.5.24
0.04398 0.01447
Output for 5.5.23
0.05288 0.0152
Output for 5.5.22
0.05684 0.01624
Output for 5.5.21
0.06148 0.01409
Output for 5.5.20
0.05524 0.01565
Output for 5.5.19
0.05453 0.01411
Output for 5.5.18
0.04384 0.01407
Output for 5.5.16
0.05917 0.01645
Output for 5.5.15
0.05813 0.01589
Output for 5.5.14
0.05884 0.01651
Output for 5.5.13
0.0512 0.01431
Output for 5.5.12
0.05765 0.01625
Output for 5.5.11
0.06201 0.01736
Output for 5.5.10
0.04376 0.01442
Output for 5.5.9
0.04368 0.01451
Output for 5.5.8
0.05839 0.01608
Output for 5.5.7
0.06022 0.01387
Output for 5.5.6
0.05972 0.01705
Output for 5.5.5
0.05757 0.01641
Output for 5.5.4
0.06015 0.0168
Output for 5.5.3
0.05913 0.01614
Output for 5.5.2
0.05778 0.01634
Output for 5.5.1
0.05934 0.01634
Output for 5.5.0
0.05189 0.01589
Output for 5.4.45
0.05605 0.01568
Output for 5.4.44
0.05602 0.01575
Output for 5.4.43
0.05713 0.01569
Output for 5.4.42
0.0604 0.01645
Output for 5.4.41
0.05173 0.01518
Output for 5.4.40
0.05387 0.01542
Output for 5.4.39
0.05716 0.01672
Output for 5.4.38
0.05561 0.01482
Output for 5.4.37
0.04634 0.01458
Output for 5.4.36
0.05836 0.0169
Output for 5.4.35
0.05993 0.01499
Output for 5.4.34
0.04712 0.01452
Output for 5.4.32
0.05736 0.01645
Output for 5.4.31
0.06458 0.0175
Output for 5.4.30
0.05079 0.01451
Output for 5.4.29
0.05728 0.01616
Output for 5.4.28
0.06114 0.01586
Output for 5.4.27
0.06231 0.01727
Output for 5.4.26
0.05782 0.0157
Output for 5.4.25
0.05875 0.01644
Output for 5.4.24
0.05855 0.01652
Output for 5.4.23
0.05984 0.01724
Output for 5.4.22
0.06081 0.01716
Output for 5.4.21
0.06072 0.01688
Output for 5.4.20
0.06201 0.01675
Output for 5.4.19
0.05836 0.01602
Output for 5.4.18
0.05275 0.01529
Output for 5.4.17
0.04968 0.0163
Output for 5.4.16
0.05935 0.01648
Output for 5.4.15
0.05058 0.01456
Output for 5.4.14
0.04885 0.01468
Output for 5.4.13
0.06126 0.01761
Output for 5.4.12
0.05756 0.01661
Output for 5.4.11
0.04875 0.01481
Output for 5.4.10
0.04815 0.01491
Output for 5.4.9
0.05764 0.01595
Output for 5.4.8
0.06243 0.0183
Output for 5.4.7
0.06074 0.01671
Output for 5.4.6
0.05831 0.01613
Output for 5.4.5
0.06067 0.01726
Output for 5.4.4
0.06227 0.01745
Output for 5.4.3
0.05461 0.01588
Output for 5.4.2
0.05398 0.01486
Output for 5.4.1
0.06222 0.01753
Output for 5.4.0
0.0463 0.01478
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '{', expecting T_STRING or T_VARIABLE or '$' in /in/EFP8W on line 21
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected '{', expecting T_STRING or T_VARIABLE or '$' in /in/EFP8W on line 21
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/EFP8W on line 4
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_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/EFP8W on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/EFP8W on line 4
Process exited with code 255.