3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $i = 300000; while($i>0) { $i--; $a[]=array($i=>$i); } print count($a);
Output for 7.0.0 - 7.0.3, 7.0.5 - 7.0.8, 7.0.16, 7.0.18 - 7.0.20, 7.0.22 - 7.0.30, 7.0.32 - 7.0.33, 7.1.1, 7.1.3, 7.1.7, 7.1.11 - 7.1.33, 7.2.0 - 7.2.3, 7.2.9 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1, 8.1.28, 8.2.18, 8.3.5 - 8.3.7
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/6tv61 on line 6
Process exited with code 255.
Output for 8.2.15 - 8.2.17, 8.3.2 - 8.3.4
Fatal error: Out of memory (allocated 31461376 bytes) (tried to allocate 20480 bytes) in /in/6tv61 on line 6 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 5.5.13 - 5.5.15, 5.5.17, 5.5.19, 5.6.0, 5.6.2, 5.6.4 - 5.6.6, 5.6.20, 5.6.29 - 5.6.30, 5.6.39, 7.0.4, 7.0.9 - 7.0.15, 7.0.17, 7.0.21, 7.0.31, 7.1.0, 7.1.2, 7.1.4 - 7.1.6, 7.1.8 - 7.1.10, 7.2.4 - 7.2.8

Process exited with code 137.
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.10, 5.5.12, 5.5.16, 5.5.18, 5.5.20 - 5.5.38, 5.6.1, 5.6.3, 5.6.7 - 5.6.19, 5.6.21, 5.6.23 - 5.6.24, 5.6.26 - 5.6.28, 5.6.31 - 5.6.38, 5.6.40
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/6tv61 on line 5
Process exited with code 255.
Output for 5.5.11, 5.6.22, 5.6.25
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/6tv61 on line 5
Process exited with code 137.
Output for 5.2.1, 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /in/6tv61 on line 6
Process exited with code 255.
Output for 5.2.2 - 5.2.5, 5.2.7 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/6tv61 on line 6
Process exited with code 255.
Output for 5.2.6
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/6tv61 on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
300000

preferences:
214.19 ms | 402 KiB | 336 Q