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_merge(...$array_2));
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/abrWO on line 13
Process exited with code 255.

preferences:
74.18 ms | 406 KiB | 5 Q