3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_2 = []; for($i=1;$i<=1000;++$i){ $temp = []; for($j=1;$j<=1000;++$j){ $temp[] = rand(1,100); } $array_2[] = $temp; } echo array_sum(array_reduce($array_2, 'array_merge', []));
Output for 7.3.0 - 7.3.6
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20971520 bytes) in /in/ALRev on line 13
Process exited with code 255.
Output for 7.1.25 - 7.1.29, 7.2.0 - 7.2.19
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16777224 bytes) in /in/ALRev on line 13
Process exited with code 255.
Output for 7.1.30

Process exited with code 137.

preferences:
60.82 ms | 408 KiB | 5 Q