3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { $foo = 'bar'; } $bar = function() { $foo = 'bar'; }; $tries = 1E5; $start = microtime(true); for ($i = 0; $i < $tries; $i++) { foo(); } echo (microtime(true) - $start)."\n"; $start = microtime(true); for ($i = 0; $i < $tries; $i++) { $bar(); } echo (microtime(true) - $start);
Output for 7.1.0
0.002349853515625 0.0033261775970459
Output for 7.0.14
0.0040061473846436 0.0058629512786865
Output for 7.0.6
0.0041518211364746 0.0051579475402832
Output for 7.0.5
0.0031318664550781 0.0039341449737549
Output for 7.0.4
0.0035209655761719 0.0043799877166748
Output for 7.0.3
0.0036888122558594 0.0046651363372803
Output for 7.0.2
0.004019021987915 0.0052421092987061
Output for 7.0.1
0.0038540363311768 0.0040819644927979
Output for 7.0.0
0.0025618076324463 0.0034379959106445
Output for hhvm-3.12.0
0.025294065475464 0.030236959457397
Output for hhvm-3.10.0
0.013787031173706 0.014969825744629
Output for 5.6.28
0.014078855514526 0.014845132827759
Output for 5.6.21
0.018267154693604 0.018103122711182
Output for 5.6.20
0.018521070480347 0.016953945159912
Output for 5.6.19
0.0078001022338867 0.0084679126739502
Output for 5.6.18
0.011620044708252 0.011445999145508
Output for 5.6.17
0.020159006118774 0.017194032669067
Output for 5.6.16
0.020891904830933 0.019928932189941
Output for 5.6.15
0.015628099441528 0.015239953994751
Output for 5.6.14
0.013967037200928 0.014551877975464
Output for 5.6.13
0.021163940429688 0.020323991775513
Output for 5.6.12
0.019503116607666 0.01926589012146
Output for 5.6.11
0.021289110183716 0.02007794380188
Output for 5.6.10
0.021305084228516 0.020143985748291
Output for 5.6.9
0.01965594291687 0.018665075302124
Output for 5.6.8
0.021888971328735 0.021237134933472
Output for 5.6.7
0.01688814163208 0.017100095748901
Output for 5.5.35
0.019536972045898 0.018805980682373
Output for 5.5.34
0.02079701423645 0.020334005355835
Output for 5.5.33
0.013753890991211 0.0082831382751465
Output for 5.5.32
0.017220020294189 0.019305944442749
Output for 5.5.31
0.018270015716553 0.018099069595337
Output for 5.5.30
0.015646934509277 0.015782833099365
Output for 5.5.29
0.020566940307617 0.019824028015137
Output for 5.5.28
0.019244909286499 0.019062042236328
Output for 5.5.27
0.013962030410767 0.014708042144775
Output for 5.5.26
0.017385005950928 0.017326831817627
Output for 5.5.25
0.018651962280273 0.017476081848145
Output for 5.5.24
0.021271944046021 0.020748853683472
Output for 5.4.45
0.0077590942382812 0.0081779956817627
Output for 5.4.44
0.0076839923858643 0.0085370540618896
Output for 5.4.43
0.0079820156097412 0.0084390640258789
Output for 5.4.42
0.0081479549407959 0.0082681179046631
Output for 5.4.41
0.0076661109924316 0.0081851482391357
Output for 5.4.40
0.0076949596405029 0.0081751346588135
Output for 5.4.39
0.014285087585449 0.015684127807617
Output for 5.4.38
0.0078549385070801 0.0083010196685791
Output for 5.4.37
0.007889986038208 0.0085301399230957
Output for 5.4.36
0.010112047195435 0.0096011161804199
Output for 5.4.35
0.0078098773956299 0.0082929134368896
Output for 5.4.34
0.0086679458618164 0.0084600448608398
Output for 5.4.32
0.0079450607299805 0.0084819793701172
Output for 5.4.31
0.0077440738677979 0.0085301399230957
Output for 5.4.30
0.007781982421875 0.0088160037994385
Output for 5.4.29
0.012266159057617 0.0081429481506348
Output for 5.4.28
0.0078191757202148 0.0081989765167236
Output for 5.4.27
0.0078749656677246 0.0082471370697021
Output for 5.4.26
0.0078999996185303 0.0085158348083496
Output for 5.4.25
0.0089538097381592 0.0093059539794922
Output for 5.4.24
0.0076711177825928 0.008281946182251
Output for 5.4.23
0.015038013458252 0.014250993728638
Output for 5.4.22
0.0076990127563477 0.0080320835113525
Output for 5.4.21
0.0078809261322021 0.0083777904510498
Output for 5.4.20
0.0076971054077148 0.0082380771636963
Output for 5.4.19
0.0075850486755371 0.0082390308380127
Output for 5.4.18
0.0075008869171143 0.0080759525299072
Output for 5.4.17
0.010201930999756 0.013443946838379
Output for 5.4.16
0.0076549053192139 0.0081019401550293
Output for 5.4.15
0.0077099800109863 0.0078999996185303
Output for 5.4.14
0.007565975189209 0.0084431171417236
Output for 5.4.13
0.008065938949585 0.0087170600891113
Output for 5.4.12
0.007519006729126 0.0081210136413574
Output for 5.4.11
0.0075089931488037 0.0079431533813477
Output for 5.4.10
0.012521028518677 0.013314008712769
Output for 5.4.9
0.0078108310699463 0.008242130279541
Output for 5.4.8
0.0080611705780029 0.0082290172576904
Output for 5.4.7
0.0081751346588135 0.0083231925964355
Output for 5.4.6
0.0076489448547363 0.008228063583374
Output for 5.4.5
0.0076498985290527 0.0082240104675293
Output for 5.4.4
0.0076332092285156 0.008202075958252
Output for 5.4.3
0.0076019763946533 0.0083589553833008
Output for 5.4.2
0.011873960494995 0.011492967605591
Output for 5.4.1
0.0075879096984863 0.008253812789917
Output for 5.4.0
0.008059024810791 0.0085701942443848
Output for 5.3.29
0.010345935821533 0.010686874389648
Output for 5.3.28
0.010562896728516 0.010554075241089
Output for 5.3.27
0.010510206222534 0.0102698802948
Output for 5.3.26
0.010895967483521 0.010676860809326
Output for 5.3.25
0.010517835617065 0.010694026947021
Output for 5.3.24
0.010794878005981 0.010700225830078
Output for 5.3.23
0.010987997055054 0.010824918746948
Output for 5.3.22
0.010783910751343 0.010635852813721
Output for 5.3.21
0.01085901260376 0.01075291633606
Output for 5.3.20
0.012075185775757 0.011965036392212
Output for 5.3.19
0.010730981826782 0.010755062103271
Output for 5.3.18
0.01017689704895 0.010191917419434
Output for 5.3.17
0.01036810874939 0.010318994522095
Output for 5.3.16
0.011053085327148 0.010700941085815
Output for 5.3.15
0.010555028915405 0.010403156280518
Output for 5.3.14
0.011337995529175 0.011103868484497
Output for 5.3.13
0.010852813720703 0.011116981506348
Output for 5.3.12
0.013713121414185 0.012752056121826
Output for 5.3.11
0.01806902885437 0.015246868133545
Output for 5.3.10
0.017330884933472 0.016049146652222
Output for 5.3.9
0.014623165130615 0.01570200920105
Output for 5.3.8
0.013334035873413 0.01311206817627
Output for 5.3.7
0.010480165481567 0.010609865188599
Output for 5.3.6
0.010730981826782 0.011343955993652
Output for 5.3.5
0.019705057144165 0.015475988388062
Output for 5.3.4
0.011113882064819 0.011734008789062
Output for 5.3.3
0.020588874816895 0.015097141265869
Output for 5.3.2
0.010677099227905 0.010363101959229
Output for 5.3.1
0.010746002197266 0.01097297668457
Output for 5.3.0
0.0102698802948 0.010385990142822
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/dFVrC on line 7
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/dFVrC on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/dFVrC on line 7
Process exited with code 255.