3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { public function bar($x,$y){ return $x*$y; } } $s = microtime(true); $foo = new foo(); for($x = 0; $x < 10000; $x++ ){ call_user_func(array($foo, 'bar'), 10,20); } echo round(microtime(true) - $s,5)."\n"; $s = microtime(true); $foo = new foo(); $bar = 'bar'; for($x = 0; $x < 10000; $x++ ){ $foo->$bar(10,20); } echo round(microtime(true) - $s,5)."\n";
Output for 7.1.0
0.00197 0.00094
Output for 7.0.14
0.00184 0.00092
Output for 7.0.10
0.0014 0.00075
Output for 7.0.9
0.00133 0.00067
Output for 7.0.8
0.00172 0.00083
Output for 7.0.7
0.00136 0.00076
Output for 7.0.6
0.00141 0.00078
Output for 7.0.5
0.00139 0.00071
Output for 7.0.4
0.00172 0.00089
Output for 7.0.3
0.00147 0.00073
Output for 7.0.2
0.0018 0.0009
Output for 7.0.1
0.00126 0.00062
Output for 7.0.0
0.00154 0.0008
Output for hhvm-3.12.0
0.00396 0.00258
Output for hhvm-3.10.0
0.00523 0.00381
Output for 5.6.28
0.00777 0.0031
Output for 5.6.25
0.00586 0.00279
Output for 5.6.24
0.00525 0.00257
Output for 5.6.23
0.00675 0.00312
Output for 5.6.22
0.00673 0.00317
Output for 5.6.21
0.00516 0.00272
Output for 5.6.20
0.00621 0.00329
Output for 5.6.19
0.00601 0.00297
Output for 5.6.18
0.00641 0.00311
Output for 5.6.17
0.00564 0.0029
Output for 5.6.16
0.00642 0.00315
Output for 5.6.15
0.00674 0.00354
Output for 5.6.14
0.00641 0.00413
Output for 5.6.13
0.00416 0.00209
Output for 5.6.12
0.00563 0.00266
Output for 5.6.11
0.00679 0.00327
Output for 5.6.10
0.00537 0.00235
Output for 5.6.9
0.00555 0.00274
Output for 5.6.8
0.00716 0.00344
Output for 5.6.7
0.00414 0.00203
Output for 5.6.6
0.0062 0.00294
Output for 5.6.5
0.00523 0.00256
Output for 5.6.4
0.00412 0.00208
Output for 5.6.3
0.00719 0.00362
Output for 5.6.2
0.00451 0.00238
Output for 5.6.1
0.00597 0.00274
Output for 5.6.0
0.00613 0.00306
Output for 5.5.38
0.0043 0.00207
Output for 5.5.37
0.00625 0.00309
Output for 5.5.36
0.00662 0.00313
Output for 5.5.35
0.00547 0.00258
Output for 5.5.34
0.00544 0.00235
Output for 5.5.33
0.01136 0.00427
Output for 5.5.32
0.00488 0.00237
Output for 5.5.31
0.00601 0.00242
Output for 5.5.30
0.00417 0.00206
Output for 5.5.29
0.00613 0.0031
Output for 5.5.28
0.0052 0.00249
Output for 5.5.27
0.00514 0.00223
Output for 5.5.26
0.00685 0.00324
Output for 5.5.25
0.00422 0.00203
Output for 5.5.24
0.00671 0.00326
Output for 5.5.23
0.0048 0.00207
Output for 5.5.22
0.0058 0.0035
Output for 5.5.21
0.00618 0.00291
Output for 5.5.20
0.00416 0.00203
Output for 5.5.19
0.00658 0.00308
Output for 5.5.18
0.00644 0.00331
Output for 5.5.16
0.00535 0.00283
Output for 5.5.15
0.00681 0.00334
Output for 5.5.14
0.0041 0.002
Output for 5.5.13
0.00515 0.0024
Output for 5.5.12
0.00637 0.00309
Output for 5.5.11
0.00745 0.00419
Output for 5.5.10
0.00506 0.00243
Output for 5.5.9
0.00698 0.00326
Output for 5.5.8
0.00678 0.00339
Output for 5.5.7
0.00851 0.00425
Output for 5.5.6
0.00543 0.00266
Output for 5.5.5
0.00438 0.00202
Output for 5.5.4
0.00421 0.00202
Output for 5.5.3
0.00453 0.0021
Output for 5.5.2
0.00429 0.00208
Output for 5.5.1
0.00423 0.00207
Output for 5.5.0
0.00545 0.00266
Output for 5.4.45
0.00592 0.00298
Output for 5.4.44
0.00583 0.00267
Output for 5.4.43
0.00707 0.00341
Output for 5.4.42
0.00764 0.00427
Output for 5.4.41
0.00536 0.00253
Output for 5.4.40
0.0047 0.00214
Output for 5.4.39
0.00611 0.00291
Output for 5.4.38
0.00678 0.00328
Output for 5.4.37
0.00853 0.00352
Output for 5.4.36
0.00498 0.00247
Output for 5.4.35
0.0059 0.00249
Output for 5.4.34
0.00642 0.0032
Output for 5.4.32
0.00632 0.00315
Output for 5.4.31
0.00772 0.00434
Output for 5.4.30
0.00602 0.00297
Output for 5.4.29
0.00777 0.00337
Output for 5.4.28
0.00681 0.00333
Output for 5.4.27
0.008 0.003
Output for 5.4.26
0.00573 0.00243
Output for 5.4.25
0.00619 0.00296
Output for 5.4.24
0.00472 0.0021
Output for 5.4.23
0.00568 0.00285
Output for 5.4.22
0.0045 0.00223
Output for 5.4.21
0.00408 0.002
Output for 5.4.20
0.00424 0.0021
Output for 5.4.19
0.00425 0.00204
Output for 5.4.18
0.00407 0.00208
Output for 5.4.17
0.00417 0.00198
Output for 5.4.16
0.00422 0.00194
Output for 5.4.15
0.00336 0.00171
Output for 5.4.14
0.00409 0.00206
Output for 5.4.13
0.00524 0.00251
Output for 5.4.12
0.00452 0.00229
Output for 5.4.11
0.00454 0.00224
Output for 5.4.10
0.00458 0.0021
Output for 5.4.9
0.00421 0.00208
Output for 5.4.8
0.00422 0.00221
Output for 5.4.7
0.00427 0.00216
Output for 5.4.6
0.00453 0.00222
Output for 5.4.5
0.00344 0.0017
Output for 5.4.4
0.00346 0.00175
Output for 5.4.3
0.00434 0.00209
Output for 5.4.2
0.0043 0.00219
Output for 5.4.1
0.00432 0.00217
Output for 5.4.0
0.00361 0.0026
Output for 5.3.29
0.00831 0.00343
Output for 5.3.28
0.00606 0.00266
Output for 5.3.27
0.00541 0.00246
Output for 5.3.26
0.00599 0.00231
Output for 5.3.25
0.00545 0.0024
Output for 5.3.24
0.00565 0.0027
Output for 5.3.23
0.00517 0.00236
Output for 5.3.22
0.00717 0.00287
Output for 5.3.21
0.00422 0.00188
Output for 5.3.20
0.00428 0.00186
Output for 5.3.19
0.00443 0.00192
Output for 5.3.18
0.00432 0.00189
Output for 5.3.17
0.00536 0.00248
Output for 5.3.16
0.00642 0.00281
Output for 5.3.15
0.00531 0.00269
Output for 5.3.14
0.00532 0.00237
Output for 5.3.13
0.00537 0.00236
Output for 5.3.12
0.00567 0.00206
Output for 5.3.11
0.00548 0.00283
Output for 5.3.10
0.00439 0.0019
Output for 5.3.9
0.00518 0.00233
Output for 5.3.8
0.00417 0.00186
Output for 5.3.7
0.00531 0.00224
Output for 5.3.6
0.00606 0.00234
Output for 5.3.5
0.0053 0.00231
Output for 5.3.4
0.00559 0.00231
Output for 5.3.3
0.00476 0.00189
Output for 5.3.2
0.0086 0.00326
Output for 5.3.1
0.00933 0.00387
Output for 5.3.0
0.00852 0.0037
Output for 5.2.17
0.0075 0.00315
Output for 5.2.16
0.00735 0.00347
Output for 5.2.15
0.00788 0.00404
Output for 5.2.14
0.01 0.00407
Output for 5.2.13
0.01064 0.00538
Output for 5.2.12
0.01076 0.00668
Output for 5.2.11
0.01263 0.00442
Output for 5.2.10
0.00864 0.00377
Output for 5.2.9
0.01028 0.0045
Output for 5.2.8
0.00934 0.00438
Output for 5.2.7
0.01202 0.00529
Output for 5.2.6
0.01331 0.00421
Output for 5.2.5
0.01163 0.00451
Output for 5.2.4
0.00757 0.00307
Output for 5.2.3
0.01138 0.00482
Output for 5.2.2
0.00908 0.00356
Output for 5.2.1
0.01386 0.00628
Output for 5.2.0
0.01125 0.00545
Output for 5.1.6
0.01307 0.00598
Output for 5.1.5
0.00994 0.0049
Output for 5.1.4
0.00731 0.00359
Output for 5.1.3
0.01094 0.00531
Output for 5.1.2
0.01775 0.0087
Output for 5.1.1
0.00993 0.0048
Output for 5.1.0
0.00855 0.00465
Output for 5.0.5
0.01828 0.00964
Output for 5.0.4
0.02162 0.01122
Output for 5.0.3
0.01506 0.00815
Output for 5.0.2
0.01775 0.00842
Output for 5.0.1
0.01511 0.00769
Output for 5.0.0
0.01732 0.00927
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/8gTYW 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/8gTYW 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/8gTYW on line 4
Process exited with code 255.