3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'); $start = microtime(true); for($i=0;$i<100000;$i++) { $str = ltrim(strrev(chunk_split(implode(array_reverse($vars)), 3, ';')),';'); } $end = microtime(true); echo $end - $start; echo "\n\n"; $start = microtime(true); for($i=0;$i<100000;$i++) { $size = sizeOf($vars); for ($i = $size-3; $i > 0; $i-=3) { array_splice($vars,$i,0,";"); } } $end = microtime(true); echo $end - $start;
Output for 7.2.0
0.036283016204834
Process exited with code 137.
Output for 7.1.7
0.045393943786621
Process exited with code 137.
Output for 7.1.6
0.079262018203735
Process exited with code 137.
Output for 7.1.5
0.078227043151855
Process exited with code 137.
Output for 7.1.0
0.081619024276733
Process exited with code 137.
Output for 7.0.20
0.069479942321777
Process exited with code 137.
Output for 7.0.14
-0.059566974639893
Process exited with code 137.
Output for 7.0.6
0.066168069839478
Process exited with code 137.
Output for 7.0.5
0.058738946914673
Process exited with code 137.
Output for 7.0.4
0.055444955825806
Process exited with code 137.
Output for 7.0.3
0.054256916046143
Process exited with code 137.
Output for 7.0.2
0.064773797988892
Process exited with code 137.
Output for 7.0.1
0.050050973892212
Process exited with code 137.
Output for 7.0.0
0.067461013793945
Process exited with code 137.
Output for 5.6.28
0.03558611869812
Process exited with code 137.
Output for 5.6.21
0.11470079421997
Process exited with code 137.
Output for 5.6.20
0.10082793235779
Process exited with code 137.
Output for 5.6.19
0.14405298233032
Process exited with code 137.
Output for 5.6.18
0.11498689651489
Process exited with code 137.
Output for 5.6.17
0.10360789299011
Process exited with code 137.
Output for 5.6.16
0.12270092964172
Process exited with code 137.
Output for 5.6.15
0.12374520301819
Process exited with code 137.
Output for 5.6.14
0.12210416793823
Process exited with code 137.
Output for 5.6.13
0.098597049713135
Process exited with code 137.
Output for 5.6.12
0.11100816726685
Process exited with code 137.
Output for 5.6.11
0.14095282554626
Process exited with code 137.
Output for 5.6.10
0.11639595031738
Process exited with code 137.
Output for 5.6.9
0.10800504684448
Process exited with code 137.
Output for 5.6.8
0.1231050491333
Process exited with code 137.
Output for 5.6.7
0.12900710105896
Process exited with code 137.
Output for 5.5.35
0.12336993217468
Process exited with code 137.
Output for 5.5.34
0.10615491867065
Process exited with code 137.
Output for 5.5.33
0.1096339225769
Process exited with code 137.
Output for 5.5.32
0.10773611068726
Process exited with code 137.
Output for 5.5.31
0.11705803871155
Process exited with code 137.
Output for 5.5.30
0.11850619316101
Process exited with code 137.
Output for 5.5.29
0.10194087028503
Process exited with code 137.
Output for 5.5.28
0.12060308456421
Process exited with code 137.
Output for 5.5.27
0.12597799301147
Process exited with code 137.
Output for 5.5.26
0.12093305587769
Process exited with code 137.
Output for 5.5.25
0.12935304641724
Process exited with code 137.
Output for 5.5.24
0.13001298904419
Process exited with code 137.
Output for 5.4.45
0.11242485046387
Process exited with code 137.
Output for 5.4.44
0.10330200195312
Process exited with code 137.
Output for 5.4.43
0.11850595474243
Process exited with code 137.
Output for 5.4.42
0.1155149936676
Process exited with code 137.
Output for 5.4.41
0.10792398452759
Process exited with code 137.
Output for 5.4.40
0.10487389564514
Process exited with code 137.
Output for 5.4.39
0.10343503952026
Process exited with code 137.
Output for 5.4.38
0.10271310806274
Process exited with code 137.
Output for 5.4.37
0.11249208450317
Process exited with code 137.
Output for 5.4.36
0.10746693611145
Process exited with code 137.
Output for 5.4.35
0.12285995483398
Process exited with code 137.
Output for 5.4.34
0.10546398162842
Process exited with code 137.
Output for 5.4.32
0.12701201438904
Process exited with code 137.
Output for 5.4.31
0.1360719203949
Process exited with code 137.
Output for 5.4.30
0.1264488697052
Process exited with code 137.
Output for 5.4.29
0.13346099853516
Process exited with code 137.
Output for 5.4.28
0.13623285293579
Process exited with code 137.
Output for 5.4.27
0.13553500175476
Process exited with code 137.
Output for 5.4.26
0.12657403945923
Process exited with code 137.
Output for 5.4.25
0.1346321105957
Process exited with code 137.
Output for 5.4.24
0.13330292701721
Process exited with code 137.
Output for 5.4.23
0.13222408294678
Process exited with code 137.
Output for 5.4.22
0.13055205345154
Process exited with code 137.
Output for 5.4.21
0.13096690177917
Process exited with code 137.
Output for 5.4.20
0.14646911621094
Process exited with code 137.
Output for 5.4.19
0.13869309425354
Process exited with code 137.
Output for 5.4.18
0.13966298103333
Process exited with code 137.
Output for 5.4.17
0.12743711471558
Process exited with code 137.
Output for 5.4.16
0.13387799263
Process exited with code 137.
Output for 5.4.15
0.13654804229736
Process exited with code 137.
Output for 5.4.14
0.16173219680786
Process exited with code 137.
Output for 5.4.13
0.16981101036072
Process exited with code 137.
Output for 5.4.12
0.17164301872253
Process exited with code 137.
Output for 5.4.11
0.13437294960022
Process exited with code 137.
Output for 5.4.10
0.13198399543762
Process exited with code 137.
Output for 5.4.9
0.14172506332397
Process exited with code 137.
Output for 5.4.8
0.15325593948364
Process exited with code 137.
Output for 5.4.7
0.13091397285461
Process exited with code 137.
Output for 5.4.6
0.13538193702698
Process exited with code 137.
Output for 5.4.5
0.14579319953918
Process exited with code 137.
Output for 5.4.4
0.13264489173889
Process exited with code 137.
Output for 5.4.3
0.13124489784241
Process exited with code 137.
Output for 5.4.2
0.13210201263428
Process exited with code 137.
Output for 5.4.1
0.1323869228363
Process exited with code 137.
Output for 5.4.0
0.13247799873352
Process exited with code 137.

preferences:
105.62 ms | 401 KiB | 92 Q