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 '<br />'; echo $s4 - $s3;
Output for 7.1.0
0.0004889965057373<br />4.9829483032227E-5
Output for 7.0.14
0.00048494338989258<br />5.1021575927734E-5
Output for 7.0.6
0.00027799606323242<br />2.7894973754883E-5
Output for 7.0.5
0.00048708915710449<br />4.4107437133789E-5
Output for 7.0.4
0.00056195259094238<br />3.0040740966797E-5
Output for 7.0.3
0.00050902366638184<br />4.9114227294922E-5
Output for 7.0.2
0.00042295455932617<br />4.3153762817383E-5
Output for 7.0.1
0.00032591819763184<br />3.0994415283203E-5
Output for 7.0.0
0.00029206275939941<br />2.8848648071289E-5
Output for 5.6.28
0.0010759830474854<br />0.00015592575073242
Output for 5.6.21
0.00089311599731445<br />0.00012397766113281
Output for 5.6.20
0.0008080005645752<br />0.00011181831359863
Output for 5.6.19
0.00079917907714844<br />0.00013208389282227
Output for 5.6.18
0.00077009201049805<br />0.0001060962677002
Output for 5.6.17
0.00062704086303711<br />7.6055526733398E-5
Output for 5.6.16
0.00087904930114746<br />0.00013995170593262
Output for 5.6.15
0.00088691711425781<br />0.00012302398681641
Output for 5.6.14
0.00084495544433594<br />0.00013518333435059
Output for 5.6.13
0.00083708763122559<br />0.00011920928955078
Output for 5.6.12
0.00092792510986328<br />0.00012302398681641
Output for 5.6.11
0.00059795379638672<br />8.6069107055664E-5
Output for 5.6.10
0.00062894821166992<br />8.702278137207E-5
Output for 5.6.9
0.00084805488586426<br />0.00011706352233887
Output for 5.6.8
0.00092792510986328<br />0.00015091896057129
Output for 5.5.35
0.00095605850219727<br />0.00013613700866699
Output for 5.5.34
0.00055503845214844<br />8.4877014160156E-5
Output for 5.5.33
0.00055885314941406<br />8.1062316894531E-5
Output for 5.5.32
0.00057101249694824<br />8.2969665527344E-5
Output for 5.5.31
0.00058197975158691<br />9.2983245849609E-5
Output for 5.5.30
0.00097107887268066<br />0.0001368522644043
Output for 5.5.29
0.00090503692626953<br />0.00014901161193848
Output for 5.5.28
0.00072312355041504<br />9.8943710327148E-5
Output for 5.5.27
0.0018599033355713<br />0.00027203559875488
Output for 5.5.26
0.00085806846618652<br />0.00014090538024902
Output for 5.5.25
0.00085997581481934<br />0.00012397766113281
Output for 5.5.24
0.00059413909912109<br />8.3208084106445E-5
Output for 5.4.45
0.0009760856628418<br />0.00013089179992676
Output for 5.4.44
0.00089907646179199<br />0.00011491775512695
Output for 5.4.43
0.00088691711425781<br />0.0001380443572998
Output for 5.4.42
0.00086092948913574<br />0.00011706352233887
Output for 5.4.41
0.00089502334594727<br />0.00011610984802246
Output for 5.4.40
0.00089120864868164<br />0.00015807151794434
Output for 5.4.39
0.0008242130279541<br />0.0001220703125
Output for 5.4.38
0.00095081329345703<br />0.00017690658569336
Output for 5.4.37
0.00095796585083008<br />0.00020813941955566
Output for 5.4.36
0.00084781646728516<br />0.00016498565673828
Output for 5.4.35
0.0008690357208252<br />0.0001828670501709
Output for 5.4.34
0.00083494186401367<br />0.0001978874206543
Output for 5.4.32
0.0006868839263916<br />0.0001838207244873
Output for 5.4.31
0.001176118850708<br />0.00021791458129883
Output for 5.4.30
0.0011391639709473<br />0.0002739429473877
Output for 5.4.29
0.0008080005645752<br />0.00013422966003418
Output for 5.4.28
0.00074100494384766<br />0.00013208389282227
Output for 5.4.27
0.00089693069458008<br />0.00014495849609375
Output for 5.4.26
0.00142502784729<br />0.00040292739868164
Output for 5.4.25
0.001600980758667<br />0.00018310546875
Output for 5.4.24
0.0013840198516846<br />0.00023913383483887
Output for 5.4.23
0.011192798614502<br />0.00025296211242676
Output for 5.4.22
0.0017168521881104<br />0.0002739429473877
Output for 5.4.21
0.001413106918335<br />0.0001828670501709
Output for 5.4.20
0.0013289451599121<br />0.00023102760314941
Output for 5.4.19
0.0014169216156006<br />0.00023794174194336
Output for 5.4.18
0.001471996307373<br />0.00026488304138184
Output for 5.4.17
0.0016219615936279<br />0.00023102760314941
Output for 5.4.16
0.0015699863433838<br />0.00027298927307129
Output for 5.4.15
0.0014379024505615<br />0.00018501281738281
Output for 5.4.14
0.0014340877532959<br />0.0094242095947266
Output for 5.4.13
0.0015199184417725<br />0.00027608871459961
Output for 5.4.12
0.0013179779052734<br />0.00035810470581055
Output for 5.4.11
0.00072407722473145<br />0.00011396408081055
Output for 5.4.10
0.0012049674987793<br />0.0002138614654541
Output for 5.4.9
0.0011088848114014<br />0.0001680850982666
Output for 5.4.8
0.006709098815918<br />0.00018310546875
Output for 5.4.7
0.0012998580932617<br />0.00029611587524414
Output for 5.4.6
0.0075700283050537<br />0.00041723251342773
Output for 5.4.5
0.0034608840942383<br />0.00017690658569336
Output for 5.4.4
0.002269983291626<br />0.00014805793762207
Output for 5.4.3
0.00062394142150879<br />0.00012111663818359
Output for 5.4.2
0.0014839172363281<br />0.00014805793762207
Output for 5.4.1
0.0064189434051514<br />0.00023198127746582
Output for 5.4.0
0.0015599727630615<br />0.00023198127746582
Output for 5.3.29
0.0013608932495117<br />0.00020694732666016
Output for 5.3.28
0.00082206726074219<br />0.00012588500976562
Output for 5.3.27
0.00073790550231934<br />0.00012302398681641
Output for 5.3.26
0.001255989074707<br />0.0002589225769043
Output for 5.3.25
0.0012140274047852<br />0.00011396408081055
Output for 5.3.24
0.011355876922607<br />0.00024604797363281
Output for 5.3.23
0.0066750049591064<br />0.0002751350402832
Output for 5.3.22
0.0017471313476562<br />0.00039410591125488
Output for 5.3.21
0.00075602531433105<br />0.0001671314239502
Output for 5.3.20
0.0014140605926514<br />0.00031018257141113
Output for 5.3.19
0.0014050006866455<br />0.00027990341186523
Output for 5.3.18
0.0078439712524414<br />0.00026297569274902
Output for 5.3.17
0.0015370845794678<br />0.00033307075500488
Output for 5.3.16
0.0013840198516846<br />0.00025296211242676
Output for 5.3.15
0.0017240047454834<br />0.00014209747314453
Output for 5.3.14
0.0013601779937744<br />0.00023007392883301
Output for 5.3.13
0.0013930797576904<br />0.00032496452331543
Output for 5.3.12
0.0013408660888672<br />0.00021791458129883
Output for 5.3.11
0.0014839172363281<br />0.00031495094299316
Output for 5.3.10
0.0014188289642334<br />0.00029802322387695
Output for 5.3.9
0.011784076690674<br />0.00031399726867676
Output for 5.3.8
0.0013539791107178<br />0.00026512145996094
Output for 5.3.7
0.0018229484558105<br />0.0066390037536621
Output for 5.3.6
0.0015580654144287<br />0.00036501884460449
Output for 5.3.5
0.0014281272888184<br />0.010519027709961
Output for 5.3.4
0.0013411045074463<br />0.00026082992553711
Output for 5.3.3
0.010627031326294<br />0.00023889541625977
Output for 5.3.2
0.0013878345489502<br />0.00024199485778809
Output for 5.3.1
0.0037112236022949<br />0.00018501281738281
Output for 5.3.0
0.0016951560974121<br />0.00020289421081543
Output for 5.2.17
0.0012531280517578<br />0.00025606155395508
Output for 5.2.16
0.0013079643249512<br />0.00021195411682129
Output for 5.2.15
0.0064749717712402<br />0.00020289421081543
Output for 5.2.14
0.0070791244506836<br />0.00073814392089844
Output for 5.2.13
0.0027759075164795<br />0.00025200843811035
Output for 5.2.12
0.0012009143829346<br />0.00023412704467773
Output for 5.2.11
0.0012009143829346<br />0.00022602081298828
Output for 5.2.10
0.0013809204101562<br />0.00022411346435547
Output for 5.2.9
0.0013928413391113<br />0.00023198127746582
Output for 5.2.8
0.0011799335479736<br />0.00018787384033203
Output for 5.2.7
0.002047061920166<br />0.00020194053649902
Output for 5.2.6
0.0013711452484131<br />0.00022196769714355
Output for 5.2.5
0.00072789192199707<br />0.00011110305786133
Output for 5.2.4
0.0013799667358398<br />0.0034890174865723
Output for 5.2.3
0.0023190975189209<br />0.001349925994873
Output for 5.2.2
0.0036249160766602<br />0.00027203559875488
Output for 5.2.1
0.0033669471740723<br />0.00030398368835449
Output for 5.2.0
0.0024499893188477<br />0.0013570785522461
Output for 5.1.6
0.0011241436004639<br />0.00018787384033203
Output for 5.1.5
0.001121997833252<br />0.00019502639770508
Output for 5.1.4
0.0012850761413574<br />0.00022411346435547
Output for 5.1.3
0.0014619827270508<br />0.00032281875610352
Output for 5.1.2
0.0094809532165527<br />0.00017094612121582
Output for 5.1.1
0.0012919902801514<br />0.00018715858459473
Output for 5.1.0
0.0014820098876953<br />0.00028586387634277
Output for 5.0.5

Process exited with code 255.
Output for 5.0.4
0.000885009765625<br />0.00045514106750488
Output for 5.0.3
0.0010280609130859<br />0.00047707557678223
Output for 5.0.2
0.00090599060058594<br />0.00046706199645996
Output for 5.0.1
0.00090789794921875<br />0.00041007995605469
Output for 5.0.0
0.00096702575683594<br />0.00058817863464355
Output for 4.4.9
0.0068969999999999<br />0.00040299999999993
Output for 4.4.8
0.002958<br />0.00040000000000007
Output for 4.4.7
0.00094799999999995<br />0.00036099999999994
Output for 4.4.6
0.002725<br />0.00048100000000006
Output for 4.4.5
0.00082800000000005<br />0.00043199999999999
Output for 4.4.4
0.001136<br />0.000498
Output for 4.4.3
0.004226<br />0.002049
Output for 4.4.2
0.000942<br />0.00042500000000001
Output for 4.4.1
0.00091400000000003<br />0.00045400000000001
Output for 4.4.0
0.005421<br />0.00047399999999997
Output for 4.3.11
0.002987<br />0.00037500000000001
Output for 4.3.10
0.003054<br />0.00041599999999997
Output for 4.3.9
0.00085499999999994<br />0.00054599999999994
Output for 4.3.8
0.00087199999999998<br />0.00036199999999997
Output for 4.3.7
0.00093100000000002<br />0.00048800000000004
Output for 4.3.6
0.000926<br />0.000397
Output for 4.3.5
0.00089499999999998<br />0.00045800000000001
Output for 4.3.4
0.006337<br />0.00039499999999998
Output for 4.3.3
0.00075799999999993<br />0.00029299999999999
Output for 4.3.2
0.00087199999999998<br />0.00035999999999992
Output for 4.3.1
0.002906<br />0.000444
Output for 4.3.0
0.00068899999999994<br />0.00030000000000008