3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); $b = 1000; $array = range(1000, 1); $i = $b; $s1 = microtime(true); while($i--) { $a = array_shift(array_slice($array, 0, 1)); } $s2 = microtime(true); echo $s2 - $s1; $s3 = microtime(true); $i = $b; while($i--) { $a = reset($array); } $s4 = microtime(true); echo "\n"; echo $s4 - $s3;
Output for 7.1.0
0.00050783157348633 5.3882598876953E-5
Output for 7.0.14
0.00054097175598145 5.4121017456055E-5
Output for 7.0.6
0.00045394897460938 4.57763671875E-5
Output for 7.0.5
0.0003960132598877 5.2928924560547E-5
Output for 7.0.4
0.00082588195800781 7.8916549682617E-5
Output for 7.0.3
0.0003821849822998 5.4121017456055E-5
Output for 7.0.2
0.00031805038452148 2.8848648071289E-5
Output for 7.0.1
0.0004429817199707 4.3153762817383E-5
Output for 7.0.0
0.00036191940307617 3.3855438232422E-5
Output for hhvm-3.12.0
0.0001988410949707 7.9154968261719E-5
Output for hhvm-3.10.0
0.00020813941955566 7.8916549682617E-5
Output for 5.6.28
0.00096702575683594 0.00012898445129395
Output for 5.6.21
0.00084209442138672 0.00013494491577148
Output for 5.6.20
0.001474142074585 0.00023388862609863
Output for 5.6.19
0.00057291984558105 7.9154968261719E-5
Output for 5.6.18
0.00093317031860352 0.00012803077697754
Output for 5.6.17
0.0006101131439209 8.392333984375E-5
Output for 5.6.16
0.00053501129150391 7.3909759521484E-5
Output for 5.6.15
0.00085186958312988 0.00011801719665527
Output for 5.6.14
0.00061416625976562 8.702278137207E-5
Output for 5.6.13
0.00059103965759277 8.1777572631836E-5
Output for 5.6.12
0.00088000297546387 0.00012302398681641
Output for 5.6.11
0.00056195259094238 7.8201293945312E-5
Output for 5.6.10
0.00068497657775879 9.608268737793E-5
Output for 5.6.9
0.0005638599395752 7.7962875366211E-5
Output for 5.6.8
0.0010960102081299 0.00016617774963379
Output for 5.5.35
0.00077605247497559 0.00011396408081055
Output for 5.5.34
0.00069308280944824 0.00010085105895996
Output for 5.5.33
0.00082516670227051 0.00012016296386719
Output for 5.5.32
0.00057601928710938 9.2029571533203E-5
Output for 5.5.31
0.000640869140625 0.00010490417480469
Output for 5.5.30
0.00057291984558105 8.2015991210938E-5
Output for 5.5.29
0.00083494186401367 0.00013899803161621
Output for 5.5.28
0.00092601776123047 0.00014495849609375
Output for 5.5.27
0.0005791187286377 8.2015991210938E-5
Output for 5.5.26
0.00076198577880859 0.00011515617370605
Output for 5.5.25
0.00058102607727051 8.2969665527344E-5
Output for 5.5.24
0.0008690357208252 0.00011801719665527
Output for 5.4.45
0.00087690353393555 0.0001227855682373
Output for 5.4.44
0.0011849403381348 0.00018501281738281
Output for 5.4.43
0.00075006484985352 0.00012087821960449
Output for 5.4.42
0.00071310997009277 8.1062316894531E-5
Output for 5.4.41
0.00086402893066406 0.00011992454528809
Output for 5.4.40
0.0013570785522461 0.00012898445129395
Output for 5.4.39
0.00056695938110352 8.1062316894531E-5
Output for 5.4.38
0.00084900856018066 0.00013899803161621
Output for 5.4.37
0.00080299377441406 0.00011587142944336
Output for 5.4.36
0.00078296661376953 8.2015991210938E-5
Output for 5.4.35
0.00084900856018066 0.0001370906829834
Output for 5.4.34
0.00085783004760742 0.00011396408081055
Output for 5.4.32
0.00056004524230957 7.8916549682617E-5
Output for 5.4.31
0.00055813789367676 8.082389831543E-5
Output for 5.4.30
0.00055909156799316 7.8916549682617E-5
Output for 5.4.29
0.00076389312744141 7.4863433837891E-5
Output for 5.4.28
0.00063490867614746 7.9154968261719E-5
Output for 5.4.27
0.00055384635925293 8.2015991210938E-5
Output for 5.4.26
0.00071907043457031 0.00010204315185547
Output for 5.4.25
0.00054383277893066 7.7962875366211E-5
Output for 5.4.24
0.00073099136352539 0.00011205673217773
Output for 5.4.23
0.00054597854614258 7.6055526733398E-5
Output for 5.4.22
0.00056791305541992 7.7009201049805E-5
Output for 5.4.21
0.00055885314941406 8.2015991210938E-5
Output for 5.4.20
0.00061917304992676 8.7976455688477E-5
Output for 5.4.19
0.00054717063903809 7.7962875366211E-5
Output for 5.4.18
0.00056195259094238 7.8916549682617E-5
Output for 5.4.17
0.00059390068054199 8.1062316894531E-5
Output for 5.4.16
0.00058293342590332 7.6770782470703E-5
Output for 5.4.15
0.00064992904663086 0.00014305114746094
Output for 5.4.14
0.00084710121154785 0.00011396408081055
Output for 5.4.13
0.00070595741271973 0.00010299682617188
Output for 5.4.12
0.00093698501586914 0.00015807151794434
Output for 5.4.11
0.00084280967712402 0.00011992454528809
Output for 5.4.10
0.00069618225097656 9.0122222900391E-5
Output for 5.4.9
0.0008399486541748 0.00014090538024902
Output for 5.4.8
0.00086188316345215 0.00010895729064941
Output for 5.4.7
0.00067806243896484 9.3936920166016E-5
Output for 5.4.6
0.00084114074707031 0.00014019012451172
Output for 5.4.5
0.0005650520324707 8.1062316894531E-5
Output for 5.4.4
0.00083494186401367 0.00011205673217773
Output for 5.4.3
0.0008399486541748 0.00011897087097168
Output for 5.4.2
0.00057697296142578 8.0108642578125E-5
Output for 5.4.1
0.00087904930114746 0.00012612342834473
Output for 5.4.0
0.00074982643127441 0.00012993812561035
Output for 5.3.29
0.00059199333190918 0.00010585784912109
Output for 5.3.28
0.00062990188598633 0.00010085105895996
Output for 5.3.27
0.00067400932312012 0.00010585784912109
Output for 5.3.26
0.00057792663574219 9.1075897216797E-5
Output for 5.3.25
0.0006101131439209 9.9897384643555E-5
Output for 5.3.24
0.00085711479187012 0.00012516975402832
Output for 5.3.23
0.00076103210449219 0.00011897087097168
Output for 5.3.22
0.00085997581481934 0.00014901161193848
Output for 5.3.21
0.0009310245513916 0.00012898445129395
Output for 5.3.20
0.00065779685974121 0.00011301040649414
Output for 5.3.19
0.00079107284545898 0.00012111663818359
Output for 5.3.18
0.0011970996856689 0.00014591217041016
Output for 5.3.17
0.00090408325195312 0.00011587142944336
Output for 5.3.16
0.00063896179199219 9.7036361694336E-5
Output for 5.3.15
0.00060892105102539 9.7036361694336E-5
Output for 5.3.14
0.00079107284545898 0.00013995170593262
Output for 5.3.13
0.00065207481384277 0.0001060962677002
Output for 5.3.12
0.00091195106506348 0.0001521110534668
Output for 5.3.11
0.00083398818969727 0.00014901161193848
Output for 5.3.10
0.00084304809570312 0.0001370906829834
Output for 5.3.9
0.00076007843017578 0.0001671314239502
Output for 5.3.8
0.00081896781921387 0.00012707710266113
Output for 5.3.7
0.00089597702026367 0.00015902519226074
Output for 5.3.6
0.00094890594482422 0.00014495849609375
Output for 5.3.5
0.00078606605529785 0.00012588500976562
Output for 5.3.4
0.00070500373840332 0.00011610984802246
Output for 5.3.3
0.00095701217651367 0.00014185905456543
Output for 5.3.2
0.0010101795196533 0.00018811225891113
Output for 5.3.1
0.0011439323425293 0.00017309188842773
Output for 5.3.0
0.00076508522033691 0.00013303756713867
Output for 5.2.17
0.00060582160949707 0.00010895729064941
Output for 5.2.16
0.00070095062255859 0.0001070499420166
Output for 5.2.15
0.00073003768920898 0.00014185905456543
Output for 5.2.14
0.00072002410888672 9.7036361694336E-5
Output for 5.2.13
0.0010640621185303 0.00016999244689941
Output for 5.2.12
0.00094199180603027 0.00017595291137695
Output for 5.2.11
0.0010240077972412 0.00015902519226074
Output for 5.2.10
0.00095605850219727 0.0001521110534668
Output for 5.2.9
0.0010020732879639 0.00017404556274414
Output for 5.2.8
0.00083303451538086 0.00014710426330566
Output for 5.2.7
0.00096487998962402 0.00015902519226074
Output for 5.2.6
0.00078201293945312 0.0001220703125
Output for 5.2.5
0.00058412551879883 0.00011205673217773
Output for 5.2.4
0.00092101097106934 0.00017189979553223
Output for 5.2.3
0.0010669231414795 0.00014495849609375
Output for 5.2.2
0.00076103210449219 0.0001218318939209
Output for 5.2.1
0.00087904930114746 0.00015592575073242
Output for 5.2.0
0.0006251335144043 0.00011897087097168
Output for 5.1.6
0.00086402893066406 0.00017118453979492
Output for 5.1.5
0.00078916549682617 0.00015401840209961
Output for 5.1.4
0.00094699859619141 9.7990036010742E-05
Output for 5.1.3
0.00057291984558105 9.7036361694336E-05
Output for 5.1.2
0.00072193145751953 0.00014591217041016
Output for 5.1.1
0.00093507766723633 0.0001680850982666
Output for 5.1.0
0.00096893310546875 0.00016999244689941
Output for 5.0.5

Process exited with code 255.
Output for 5.0.4
0.00045490264892578 0.00022697448730469
Output for 5.0.3
0.00073719024658203 0.00034403800964355
Output for 5.0.2
0.00065302848815918 0.00030303001403809
Output for 5.0.1
0.00061893463134766 0.00026392936706543
Output for 5.0.0
0.00075316429138184 0.00031900405883789
Output for 4.4.9
0.00069400000000003 0.00030999999999998
Output for 4.4.8
0.00087400000000004 0.00037500000000001
Output for 4.4.7
0.00054799999999999 0.00020100000000001
Output for 4.4.6
0.00062099999999998 0.00035399999999997
Output for 4.4.5
0.00076199999999993 0.00034199999999995
Output for 4.4.4
0.00072299999999997 0.000336
Output for 4.4.3
0.000587 0.00024900000000005
Output for 4.4.2
0.00076299999999999 0.00032300000000002
Output for 4.4.1
0.001158 0.00050600000000001
Output for 4.4.0
0.00064700000000006 0.00026799999999993
Output for 4.3.11
0.000753 0.000335
Output for 4.3.10
0.00068400000000002 0.000307
Output for 4.3.9
0.00058599999999998 0.00024800000000003
Output for 4.3.8
0.000711 0.00030100000000001
Output for 4.3.7
0.00070499999999998 0.00025800000000001
Output for 4.3.6
0.00081700000000001 0.00034699999999999
Output for 4.3.5
0.00080999999999998 0.00037699999999996
Output for 4.3.4
0.00068800000000002 0.00033400000000006
Output for 4.3.3
0.00081600000000004 0.000332
Output for 4.3.2
0.00057499999999999 0.00025200000000003
Output for 4.3.1
0.000747 0.00031
Output for 4.3.0
0.00049299999999999 0.00022599999999998