3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $starttime = microtime(true); $array = [3,4,1,3,5,1,92,2,4124,424,52,12]; $array_count = count($array); for ($c=0;$c<100000;$c++) { for ($i=0;$i<$array_count;$i++) { for ($y=0;$y<$array_count-1;$y++) { if ($array[$y+1] < $array[$y]) { $t = $array[$y]; $array[$y] = $array[$y+1]; $array[$y+1] = $t; } } } } echo microtime(true) - $starttime;
based on idhIv
Output for 7.1.0
-0.34613704681396
Output for 7.0.14
0.42396593093872
Output for 7.0.7
0.37921905517578
Output for 7.0.6
0.38515996932983
Output for 7.0.5
0.44751286506653
Output for 7.0.4
0.4450249671936
Output for 7.0.3
0.42972993850708
Output for 7.0.2
0.51854610443115
Output for 7.0.1
0.39090299606323
Output for 7.0.0
0.430340051651
Output for 5.6.28
0.93092083930969
Output for 5.6.21
0.91504597663879
Output for 5.6.20
0.89047598838806
Output for 5.6.19
0.92944478988647
Output for 5.6.18
0.9193868637085
Output for 5.6.17
0.89395904541016
Output for 5.6.16
0.86095905303955
Output for 5.6.15
0.92415380477905
Output for 5.6.14
0.86412215232849
Output for 5.6.13
0.92450404167175
Output for 5.6.12
0.89072489738464
Output for 5.6.11
1.0204839706421
Output for 5.6.10
0.88590788841248
Output for 5.6.9
0.96729612350464
Output for 5.6.8
0.92023897171021
Output for 5.6.7
0.86284494400024
Output for 5.5.35
0.910080909729
Output for 5.5.34
0.92282700538635
Output for 5.5.33
0.90003800392151
Output for 5.5.32
1.0592110157013
Output for 5.5.31
0.94260287284851
Output for 5.5.30
0.9055700302124
Output for 5.5.29
0.92106294631958
Output for 5.5.28
1.045520067215
Output for 5.5.27
0.92457389831543
Output for 5.5.26
1.0261600017548
Output for 5.5.25
0.95309901237488
Output for 5.5.24
1.1328527927399
Output for 5.4.45
0.87313199043274
Output for 5.4.44
0.8810019493103
Output for 5.4.43
0.88128709793091
Output for 5.4.42
0.87291216850281
Output for 5.4.41
0.87744998931885
Output for 5.4.40
0.89516592025757
Output for 5.4.39
1.0879509449005
Output for 5.4.38
0.89312100410461
Output for 5.4.37
0.89955806732178
Output for 5.4.36
0.90169596672058
Output for 5.4.35
0.91195201873779
Output for 5.4.34
0.89768505096436
Output for 5.4.32
0.89166402816772
Output for 5.4.31
1.1141829490662
Output for 5.4.30
0.88717293739319
Output for 5.4.29
0.91883206367493
Output for 5.4.28
0.91194295883179
Output for 5.4.27
0.91798996925354
Output for 5.4.26
0.92655086517334
Output for 5.4.25
0.94561195373535
Output for 5.4.24
1.0820050239563
Output for 5.4.23
0.90866804122925
Output for 5.4.22
1.0528979301453
Output for 5.4.21
0.93708300590515
Output for 5.4.20
0.92338490486145
Output for 5.4.19
0.94475412368774
Output for 5.4.18
1.011039018631
Output for 5.4.17
1.0627892017365
Output for 5.4.16
0.94094109535217
Output for 5.4.15
1.1689438819885
Output for 5.4.14
0.92073702812195
Output for 5.4.13
1.2298700809479
Output for 5.4.12
0.88509702682495
Output for 5.4.11
0.89760398864746
Output for 5.4.10
1.1785581111908
Output for 5.4.9
0.90711712837219
Output for 5.4.8
0.8983211517334
Output for 5.4.7
0.94951796531677
Output for 5.4.6
0.91157197952271
Output for 5.4.5
1.2292339801788
Output for 5.4.4
0.88122200965881
Output for 5.4.3
0.89082908630371
Output for 5.4.2
1.2309260368347
Output for 5.4.1
0.90171813964844
Output for 5.4.0
0.9987108707428
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/K7Ocr on line 4
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/K7Ocr on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/K7Ocr on line 4
Process exited with code 255.