3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0, 250_000); $b = range(250_000, 500_000); $start = microtime(true); foreach(array_merge($a, $b) as $key => $item){ // } $elapsed = microtime(true) - $start; var_dump($elapsed);
Output for 8.3.3
float(0.017344951629638672)
Output for 8.3.2
float(0.015902042388916016)
Output for 8.3.1
float(0.012875080108642578)
Output for 8.3.0
float(0.012762069702148438)
Output for 8.2.16
float(0.012312173843383789)
Output for 8.2.15
float(0.015280008316040039)
Output for 8.2.14
float(0.01541590690612793)
Output for 8.2.13
float(0.012205123901367188)
Output for 8.2.12
float(0.012429952621459961)
Output for 8.2.11
float(0.015015125274658203)
Output for 8.2.10
float(0.01208186149597168)
Output for 8.2.9
float(0.013957977294921875)
Output for 8.2.8
float(0.015233993530273438)
Output for 8.2.7
float(0.012238025665283203)
Output for 8.2.6
float(0.01205897331237793)
Output for 8.2.5
float(0.012836933135986328)
Output for 8.2.4
float(0.012388944625854492)
Output for 8.2.3
float(0.01240086555480957)
Output for 8.2.2
float(0.012104034423828125)
Output for 8.2.1
float(0.012083053588867188)
Output for 8.2.0
float(0.012176990509033203)
Output for 8.1.2 - 8.1.27
Fatal error: Out of memory (allocated 18882560) (tried to allocate 16777224 bytes) in /in/OmUb3 on line 8 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 8.1.1
float(0.027380943298339844)
Output for 8.1.0
float(0.02680492401123047)

preferences:
43.6 ms | 437 KiB | 5 Q