3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = []; for ($i = 0; $i < 10000; --$i) $a[$i] = $i; var_dump(memory_get_usage());
Output for 7.0.0, 7.0.9 - 7.0.20, 7.1.0 - 7.1.6
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 75497472 bytes) in /in/M36IZ on line 3
Process exited with code 255.
Output for 7.0.1 - 7.0.8

Process exited with code 137.

preferences:
66.73 ms | 401 KiB | 33 Q