3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Kitchen { private $yummy = 'cake'; } $time_start = microtime(true); for ($i = 0; $i < 100000; $i += 1) { $sweetsThief = Closure::bind(function (Kitchen $kitchen) { return $kitchen->yummy; }, null, 'Kitchen'); } echo microtime(true) - $time_start;
Output for 7.1.0
0.059167861938477
Output for 7.0.14
0.046296834945679
Output for 7.0.10
0.042659997940063
Output for 7.0.9
0.044106006622314
Output for 7.0.8
0.043423891067505
Output for 7.0.7
0.039967060089111
Output for 7.0.6
0.031809091567993
Output for 7.0.5
0.032377004623413
Output for 7.0.4
0.034013986587524
Output for 7.0.3
0.03273606300354
Output for 7.0.2
0.034323930740356
Output for 7.0.1
0.03254508972168
Output for 7.0.0
0.043961048126221
Output for 5.6.28
0.055449962615967
Output for 5.6.25
0.050467014312744
Output for 5.6.24
0.044633865356445
Output for 5.6.23
0.049720048904419
Output for 5.6.22
0.03943395614624
Output for 5.6.21
0.041029930114746
Output for 5.6.20
0.041497945785522
Output for 5.6.19
0.039870977401733
Output for 5.6.18
0.04525089263916
Output for 5.6.17
0.041215896606445
Output for 5.6.16
0.040566921234131
Output for 5.6.15
0.046888113021851
Output for 5.6.14
0.04208779335022
Output for 5.6.13
0.039210081100464
Output for 5.6.12
0.040319919586182
Output for 5.6.11
0.039255857467651
Output for 5.6.10
0.064702033996582
Output for 5.6.9
0.057747840881348
Output for 5.6.8
0.054669857025146
Output for 5.6.7
0.049314022064209
Output for 5.6.6
0.049409151077271
Output for 5.6.5
0.057415962219238
Output for 5.6.4
0.048889875411987
Output for 5.6.3
0.051654100418091
Output for 5.6.2
0.047942876815796
Output for 5.6.1
0.052060842514038
Output for 5.6.0
0.047727823257446
Output for 5.5.38
0.058584928512573
Output for 5.5.37
0.047379016876221
Output for 5.5.36
0.041865110397339
Output for 5.5.35
0.041836977005005
Output for 5.5.34
0.050013065338135
Output for 5.5.33
0.043105125427246
Output for 5.5.32
0.040692090988159
Output for 5.5.31
0.041630983352661
Output for 5.5.30
0.057372093200684
Output for 5.5.29
0.046481132507324
Output for 5.5.28
0.043334007263184
Output for 5.5.27
0.041224002838135
Output for 5.5.26
0.04918384552002
Output for 5.5.25
0.05102014541626
Output for 5.5.24
0.048192977905273
Output for 5.5.23
0.055099010467529
Output for 5.5.22
0.050557851791382
Output for 5.5.21
0.051124095916748
Output for 5.5.20
0.055215120315552
Output for 5.5.19
0.045423984527588
Output for 5.5.18
0.058596134185791
Output for 5.5.16
0.052809000015259
Output for 5.5.15
0.05678915977478
Output for 5.5.14
0.062214136123657
Output for 5.5.13
0.048725128173828
Output for 5.5.12
0.058730125427246
Output for 5.5.11
0.050606966018677
Output for 5.5.10
0.055392026901245
Output for 5.5.9
0.062011957168579
Output for 5.5.8
0.057903051376343
Output for 5.5.7
0.052657127380371
Output for 5.5.6
0.064388990402222
Output for 5.5.5
0.05806303024292
Output for 5.5.4
0.055448055267334
Output for 5.5.3
0.055045127868652
Output for 5.5.2
0.049043893814087
Output for 5.5.1
0.048256874084473
Output for 5.5.0
0.05267596244812
Output for 5.4.45
0.040366888046265
Output for 5.4.44
0.040364027023315
Output for 5.4.43
0.041408061981201
Output for 5.4.42
0.045323848724365
Output for 5.4.41
0.04994797706604
Output for 5.4.40
0.060347080230713
Output for 5.4.39
0.053606033325195
Output for 5.4.38
0.039649963378906
Output for 5.4.37
0.049805879592896
Output for 5.4.36
0.051420927047729
Output for 5.4.35
0.04430103302002
Output for 5.4.34
0.050028085708618
Output for 5.4.32
0.058574914932251
Output for 5.4.31
0.058465003967285
Output for 5.4.30
0.053187131881714
Output for 5.4.29
0.050428152084351
Output for 5.4.28
0.05593204498291
Output for 5.4.27
0.05302095413208
Output for 5.4.26
0.058544874191284
Output for 5.4.25
0.058966875076294
Output for 5.4.24
0.051600933074951
Output for 5.4.23
0.052497148513794
Output for 5.4.22
0.051757097244263
Output for 5.4.21
0.046442985534668
Output for 5.4.20
0.055913925170898
Output for 5.4.19
0.047538995742798
Output for 5.4.18
0.055125951766968
Output for 5.4.17
0.049905061721802
Output for 5.4.16
0.054620981216431
Output for 5.4.15
0.043408155441284
Output for 5.4.14
0.056942939758301
Output for 5.4.13
0.044814109802246
Output for 5.4.12
0.062030076980591
Output for 5.4.11
0.04707407951355
Output for 5.4.10
0.050573110580444
Output for 5.4.9
0.061949968338013
Output for 5.4.8
0.056015014648438
Output for 5.4.7
0.047214031219482
Output for 5.4.6
0.056152820587158
Output for 5.4.5
0.050501823425293
Output for 5.4.4
0.059309005737305
Output for 5.4.3
0.049998044967651
Output for 5.4.2
0.051805973052979
Output for 5.4.1
0.05265212059021
Output for 5.4.0
0.051671981811523
Output for 5.3.0 - 5.3.29
Fatal error: Call to undefined method Closure::bind() in /in/CPYO7 on line 13
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/CPYO7 on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/CPYO7 on line 13
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/CPYO7 on line 5
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/CPYO7 on line 5
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/CPYO7 on line 5
Process exited with code 255.