3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = microtime(true); $stack = new SplStack(); $array = []; for ($i = 0; $i < 100000; ++$i) { //$stack->push($i); $array[] = $i; } $tmp = 0; for ($i = 0; $i < 100000; ++$i) { //$tmp = $stack->pop(); $tmp = array_pop($array); } echo microtime(true) - $start;
based on fFk1E
Output for 7.1.0
0.0095489025115967
Output for 7.0.14
0.0092439651489258
Output for 7.0.10
0.0092761516571045
Output for 7.0.9
0.12307000160217
Output for 7.0.8
0.10530114173889
Output for 7.0.7
0.12310099601746
Output for 7.0.6
0.11773300170898
Output for 7.0.5
0.1288800239563
Output for 7.0.4
0.087975978851318
Output for 7.0.3
0.12403798103333
Output for 7.0.2
0.11666417121887
Output for 7.0.1
0.10650491714478
Output for 7.0.0
0.10825204849243
Output for 5.6.28
0.039768934249878
Output for 5.6.25
0.039604902267456
Output for 5.6.24
0.032066822052002
Output for 5.6.23
0.038918018341064
Output for 5.6.22
0.030393838882446
Output for 5.6.21
0.037786960601807
Output for 5.6.20
0.038383960723877
Output for 5.6.19
0.039978981018066
Output for 5.6.18
0.031781911849976
Output for 5.6.17
0.036362886428833
Output for 5.6.16
0.035989999771118
Output for 5.6.15
0.034576892852783
Output for 5.6.14
0.054863929748535
Output for 5.6.13
0.05575704574585
Output for 5.6.12
0.033729791641235
Output for 5.6.11
0.036160945892334
Output for 5.6.10
0.039690017700195
Output for 5.6.9
0.030366897583008
Output for 5.6.8
0.040238857269287
Output for 5.6.7
0.034813165664673
Output for 5.6.6
0.03393292427063
Output for 5.6.5
0.034003019332886
Output for 5.6.4
0.028814077377319
Output for 5.6.3
0.036825180053711
Output for 5.6.2
0.038408994674683
Output for 5.6.1
0.029407024383545
Output for 5.6.0
0.035763025283813
Output for 5.5.38
0.038811922073364
Output for 5.5.37
0.031392097473145
Output for 5.5.36
0.032397031784058
Output for 5.5.35
0.035274982452393
Output for 5.5.34
0.029524087905884
Output for 5.5.33
0.032593011856079
Output for 5.5.32
0.035614967346191
Output for 5.5.31
0.030034065246582
Output for 5.5.30
0.03236198425293
Output for 5.5.29
0.028141975402832
Output for 5.5.28
0.052279949188232
Output for 5.5.27
0.042133092880249
Output for 5.5.26
0.040181159973145
Output for 5.5.25
0.039778232574463
Output for 5.5.24
0.037344932556152
Output for 5.5.23
0.031380891799927
Output for 5.5.22
0.040838003158569
Output for 5.5.21
0.033878087997437
Output for 5.5.20
0.030761957168579
Output for 5.5.19
0.040592908859253
Output for 5.5.18
0.04069709777832
Output for 5.5.16
0.026358842849731
Output for 5.5.15
0.041895151138306
Output for 5.5.14
0.038096189498901
Output for 5.5.13
0.039543867111206
Output for 5.5.12
0.040263891220093
Output for 5.5.11
0.041069984436035
Output for 5.5.10
0.038722038269043
Output for 5.5.9
0.033302783966064
Output for 5.5.8
0.037605047225952
Output for 5.5.7
0.041488885879517
Output for 5.5.6
0.0362229347229
Output for 5.5.5
0.031140089035034
Output for 5.5.4
0.038928031921387
Output for 5.5.3
0.030684947967529
Output for 5.5.2
0.036614179611206
Output for 5.5.1
0.038045883178711
Output for 5.5.0
0.042972087860107
Output for 5.4.45
0.035570859909058
Output for 5.4.44
0.035516977310181
Output for 5.4.43
0.040993928909302
Output for 5.4.42
0.030672073364258
Output for 5.4.41
0.035449981689453
Output for 5.4.40
0.041095018386841
Output for 5.4.39
0.040565013885498
Output for 5.4.38
0.031572103500366
Output for 5.4.37
0.035979986190796
Output for 5.4.36
0.032181024551392
Output for 5.4.35
0.041951179504395
Output for 5.4.34
0.036067962646484
Output for 5.4.32
0.03858208656311
Output for 5.4.31
0.036834955215454
Output for 5.4.30
0.029853820800781
Output for 5.4.29
0.035254001617432
Output for 5.4.28
0.041211843490601
Output for 5.4.27
0.039424896240234
Output for 5.4.26
0.040647029876709
Output for 5.4.25
0.040880918502808
Output for 5.4.24
0.027554035186768
Output for 5.4.23
0.026908874511719
Output for 5.4.22
0.035822868347168
Output for 5.4.21
0.039811849594116
Output for 5.4.20
0.03824782371521
Output for 5.4.19
0.041445970535278
Output for 5.4.18
0.040575981140137
Output for 5.4.17
0.039346218109131
Output for 5.4.16
0.033581018447876
Output for 5.4.15
0.037063121795654
Output for 5.4.14
0.030642986297607
Output for 5.4.13
0.031271934509277
Output for 5.4.12
0.042448997497559
Output for 5.4.11
0.040148019790649
Output for 5.4.10
0.040435075759888
Output for 5.4.9
0.04291296005249
Output for 5.4.8
0.033905029296875
Output for 5.4.7
0.039284944534302
Output for 5.4.6
0.036802053451538
Output for 5.4.5
0.039154052734375
Output for 5.4.4
0.043267965316772
Output for 5.4.3
0.038920879364014
Output for 5.4.2
0.035840034484863
Output for 5.4.1
0.029330968856812
Output for 5.4.0
0.041368961334229
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/6Df7k on line 5
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 '[' in /in/6Df7k on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/6Df7k on line 5
Process exited with code 255.