3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tries = 100000; $arr = array(1,2,3); $start = microtime(true); $len = count($arr); for ($i = 0; $i < $tries; $i++) { for ($j = 0; $j < $len; $j++) { $test = $arr[$j]; } } echo (microtime(true) - $start)."\n"; $start = microtime(true); for ($i = 0; $i < $tries; $i++) { while ($item = next($arr) !== false) { } } echo (microtime(true) - $start);
Output for 7.1.0
0.011669874191284 0.0082399845123291
Output for 7.0.14
0.016795873641968 0.0082168579101562
Output for 7.0.10
0.0076639652252197 0.0040221214294434
Output for 7.0.9
0.010987043380737 0.0062129497528076
Output for 7.0.8
0.0071828365325928 0.0049130916595459
Output for 7.0.7
0.0076699256896973 0.0046827793121338
Output for 7.0.6
0.0078539848327637 0.0041940212249756
Output for 7.0.5
0.009937047958374 0.0055840015411377
Output for 7.0.4
0.0080928802490234 0.0050220489501953
Output for 7.0.3
0.010268926620483 0.0060970783233643
Output for 7.0.2
0.0099201202392578 0.00531005859375
Output for 7.0.1
0.011116027832031 0.0060310363769531
Output for 7.0.0
0.009145975112915 0.0053768157958984
Output for hhvm-3.12.0
0.043433904647827 0.014533042907715
Output for hhvm-3.10.0
0.053838968276978 0.018562078475952
Output for 5.6.28
0.028378009796143 0.014400959014893
Output for 5.6.25
0.021022081375122 0.011386871337891
Output for 5.6.24
0.020372867584229 0.011411190032959
Output for 5.6.23
0.023659944534302 0.011947870254517
Output for 5.6.22
0.020352840423584 0.012088060379028
Output for 5.6.21
0.022984981536865 0.012402057647705
Output for 5.6.20
0.023524045944214 0.013515949249268
Output for 5.6.19
0.023278951644897 0.013177156448364
Output for 5.6.18
0.017855882644653 0.010589838027954
Output for 5.6.17
0.0193190574646 0.011632919311523
Output for 5.6.16
0.020344972610474 0.011639833450317
Output for 5.6.15
0.020918846130371 0.012233018875122
Output for 5.6.14
0.024103164672852 0.011420011520386
Output for 5.6.13
0.033926010131836 0.017209053039551
Output for 5.6.12
0.017726182937622 0.010296106338501
Output for 5.6.11
0.015631914138794 0.0093259811401367
Output for 5.6.10
0.014827013015747 0.0094349384307861
Output for 5.6.9
0.015838146209717 0.0093398094177246
Output for 5.6.8
0.018051147460938 0.010879039764404
Output for 5.6.7
0.026754856109619 0.014853000640869
Output for 5.6.6
0.02031397819519 0.012331962585449
Output for 5.6.5
0.014834880828857 0.0094788074493408
Output for 5.6.4
0.015664100646973 0.0094270706176758
Output for 5.6.3
0.023197889328003 0.012564182281494
Output for 5.6.2
0.015655994415283 0.0094199180603027
Output for 5.6.1
0.014600992202759 0.0099530220031738
Output for 5.6.0
0.015672922134399 0.0091907978057861
Output for 5.5.38
0.024327993392944 0.013204097747803
Output for 5.5.37
0.027168035507202 0.013940095901489
Output for 5.5.36
0.023614168167114 0.010704040527344
Output for 5.5.35
0.020904064178467 0.011847019195557
Output for 5.5.34
0.021584033966064 0.012383937835693
Output for 5.5.33
0.026767015457153 0.015326023101807
Output for 5.5.32
0.02214789390564 0.012857913970947
Output for 5.5.31
0.023766040802002 0.012579917907715
Output for 5.5.30
0.023283958435059 0.014474868774414
Output for 5.5.29
0.021846055984497 0.010344982147217
Output for 5.5.28
0.020013093948364 0.011963129043579
Output for 5.5.27
0.017053842544556 0.010286092758179
Output for 5.5.26
0.022582054138184 0.013305902481079
Output for 5.5.25
0.015485048294067 0.0094928741455078
Output for 5.5.24
0.015014886856079 0.0096399784088135
Output for 5.5.23
0.019513130187988 0.011300086975098
Output for 5.5.22
0.017840147018433 0.010298013687134
Output for 5.5.21
0.01882004737854 0.010113954544067
Output for 5.5.20
0.016996145248413 0.010044097900391
Output for 5.5.19
0.01603102684021 0.0097041130065918
Output for 5.5.18
0.016271114349365 0.0098028182983398
Output for 5.5.16
0.023420095443726 0.013015985488892
Output for 5.5.15
0.014614105224609 0.0093531608581543
Output for 5.5.14
0.017874002456665 0.010209083557129
Output for 5.5.13
0.019214153289795 0.012547969818115
Output for 5.5.12
0.016290187835693 0.010112047195435
Output for 5.5.11
0.017899990081787 0.010311126708984
Output for 5.5.10
0.016322135925293 0.0098240375518799
Output for 5.5.9
0.026734828948975 0.012359142303467
Output for 5.5.8
0.022852897644043 0.012854099273682
Output for 5.5.7
0.02471399307251 0.01147198677063
Output for 5.5.6
0.022114038467407 0.012969017028809
Output for 5.5.5
0.026381015777588 0.01404595375061
Output for 5.5.4
0.025144815444946 0.013765096664429
Output for 5.5.3
0.023735046386719 0.01360011100769
Output for 5.5.2
0.02649998664856 0.015048027038574
Output for 5.5.1
0.019241094589233 0.010856866836548
Output for 5.5.0
0.017966985702515 0.011641025543213
Output for 5.4.45
0.025604009628296 0.011666059494019
Output for 5.4.44
0.016872882843018 0.01008415222168
Output for 5.4.43
0.015960931777954 0.0098378658294678
Output for 5.4.42
0.015974044799805 0.0096449851989746
Output for 5.4.41
0.015959024429321 0.0098071098327637
Output for 5.4.40
0.025647878646851 0.012198925018311
Output for 5.4.39
0.024518966674805 0.013185977935791
Output for 5.4.38
0.021023035049438 0.011587142944336
Output for 5.4.37
0.017174959182739 0.0099890232086182
Output for 5.4.36
0.017314910888672 0.010236024856567
Output for 5.4.35
0.016321182250977 0.010095119476318
Output for 5.4.34
0.022248983383179 0.013463973999023
Output for 5.4.32
0.01685905456543 0.011070966720581
Output for 5.4.31
0.016237020492554 0.010770082473755
Output for 5.4.30
0.016438007354736 0.0098919868469238
Output for 5.4.29
0.016294002532959 0.010130882263184
Output for 5.4.28
0.015472173690796 0.0098869800567627
Output for 5.4.27
0.016674041748047 0.010325908660889
Output for 5.4.26
0.015998840332031 0.0097830295562744
Output for 5.4.25
0.014456033706665 0.0088920593261719
Output for 5.4.24
0.015475988388062 0.0095930099487305
Output for 5.4.23
0.015465021133423 0.0097088813781738
Output for 5.4.22
0.024845838546753 0.01452898979187
Output for 5.4.21
0.025186061859131 0.011822938919067
Output for 5.4.20
0.022839069366455 0.011630058288574
Output for 5.4.19
0.021188974380493 0.011990785598755
Output for 5.4.18
0.021498918533325 0.011560916900635
Output for 5.4.17
0.023282051086426 0.013379096984863
Output for 5.4.16
0.021753072738647 0.013017892837524
Output for 5.4.15
0.033082962036133 0.029838085174561
Output for 5.4.14
0.025496959686279 0.013059139251709
Output for 5.4.13
0.029753923416138 0.015369892120361
Output for 5.4.12
0.02342700958252 0.013583183288574
Output for 5.4.11
0.024844169616699 0.015237092971802
Output for 5.4.10
0.024311065673828 0.014032125473022
Output for 5.4.9
0.027043104171753 0.015251159667969
Output for 5.4.8
0.029716968536377 0.016120910644531
Output for 5.4.7
0.023510932922363 0.013170003890991
Output for 5.4.6
0.021723985671997 0.01251482963562
Output for 5.4.5
0.014986991882324 0.0097959041595459
Output for 5.4.4
0.016808986663818 0.010532855987549
Output for 5.4.3
0.027981042861938 0.013343095779419
Output for 5.4.2
0.01810097694397 0.011914014816284
Output for 5.4.1
0.026648998260498 0.015608072280884
Output for 5.4.0
0.022845029830933 0.012868165969849
Output for 5.3.29
0.023613214492798 0.012139081954956
Output for 5.3.28
0.024736881256104 0.01314115524292
Output for 5.3.27
0.033453941345215 0.016875028610229
Output for 5.3.26
0.029849052429199 0.013792991638184
Output for 5.3.25
0.023741960525513 0.012240886688232
Output for 5.3.24
0.030344009399414 0.014057159423828
Output for 5.3.23
0.030890941619873 0.016320943832397
Output for 5.3.22
0.031713962554932 0.014173984527588
Output for 5.3.21
0.028099060058594 0.014486789703369
Output for 5.3.20
0.036562919616699 0.017911195755005
Output for 5.3.19
0.031363964080811 0.012717962265015
Output for 5.3.18
0.03940486907959 0.02167797088623
Output for 5.3.17
0.023063182830811 0.01254415512085
Output for 5.3.16
0.034262895584106 0.01529598236084
Output for 5.3.15
0.021466970443726 0.012038946151733
Output for 5.3.14
0.037873983383179 0.013803005218506
Output for 5.3.13
0.031947135925293 0.016687870025635
Output for 5.3.12
0.021416902542114 0.011197090148926
Output for 5.3.11
0.036698818206787 0.017983913421631
Output for 5.3.10
0.030812978744507 0.015906095504761
Output for 5.3.9
0.032689809799194 0.018411159515381
Output for 5.3.8
0.031926870346069 0.015151977539062
Output for 5.3.7
0.032575130462646 0.016424894332886
Output for 5.3.6
0.032711982727051 0.016074895858765
Output for 5.3.5
0.028757095336914 0.017380952835083
Output for 5.3.4
0.036846876144409 0.01879096031189
Output for 5.3.3
0.035387992858887 0.015630960464478
Output for 5.3.2
0.03119683265686 0.016006946563721
Output for 5.3.1
0.028832912445068 0.015501976013184
Output for 5.3.0
0.035363912582397 0.017784118652344
Output for 5.2.17
0.034121036529541 0.01383900642395
Output for 5.2.16
0.04636812210083 0.017990827560425
Output for 5.2.15
0.035179138183594 0.014573097229004
Output for 5.2.14
0.035495042800903 0.014540195465088
Output for 5.2.13
0.037987947463989 0.016615867614746
Output for 5.2.12
0.048308849334717 0.019051074981689
Output for 5.2.11
0.045478820800781 0.015625953674316
Output for 5.2.10
0.045192003250122 0.018069982528687
Output for 5.2.9
0.04590106010437 0.017168998718262
Output for 5.2.8
0.040231227874756 0.015214920043945
Output for 5.2.7
0.04969596862793 0.019316911697388
Output for 5.2.6
0.044174909591675 0.017163991928101
Output for 5.2.5
0.030874013900757 0.013334989547729
Output for 5.2.4
0.055088043212891 0.019727945327759
Output for 5.2.3
0.050392150878906 0.018702983856201
Output for 5.2.2
0.043613910675049 0.017225027084351
Output for 5.2.1
0.044323921203613 0.017411947250366
Output for 5.2.0
0.051062822341919 0.019514083862305
Output for 5.1.6
0.049467086791992 0.018465995788574
Output for 5.1.5
0.042931079864502 0.016039848327637
Output for 5.1.4
0.045212984085083 0.016633033752441
Output for 5.1.3
0.048626899719238 0.018164873123169
Output for 5.1.2
0.049413919448853 0.018145084381104
Output for 5.1.1
0.052142143249512 0.022840976715088
Output for 5.1.0
0.046481132507324 0.020064830780029
Output for 5.0.5
0.13039708137512 0.035290002822876
Output for 5.0.4
0.13368701934814 0.03554892539978
Output for 5.0.3
0.1151978969574 0.03070592880249
Output for 5.0.2
0.10306215286255 0.032043218612671
Output for 5.0.1
0.12960886955261 0.035011053085327
Output for 5.0.0
0.14142894744873 0.032283067703247
Output for 4.4.9
0.136931 0.034021
Output for 4.4.8
0.118519 0.02952
Output for 4.4.7
0.119729 0.028551
Output for 4.4.6
0.110946 0.030252
Output for 4.4.5
0.109605 0.028706
Output for 4.4.4
0.08428 0.029698
Output for 4.4.3
0.093486 0.027367
Output for 4.4.2
0.113236 0.032036
Output for 4.4.1
0.108283 0.028157
Output for 4.4.0
0.096098 0.029425
Output for 4.3.11
0.12771 0.03117
Output for 4.3.10
0.118838 0.031628
Output for 4.3.9
0.109928 0.033359
Output for 4.3.8
0.112992 0.029933
Output for 4.3.7
0.116058 0.030079
Output for 4.3.6
0.123937 0.032758
Output for 4.3.5
0.131803 0.033819
Output for 4.3.4
0.106993 0.028576
Output for 4.3.3
0.094635 0.027475
Output for 4.3.2
0.11672 0.026382
Output for 4.3.1
0.133016 0.031907
Output for 4.3.0
0.11084 0.029878