3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); foreach (range(1, 1000000) as $i) { $a []= new StdClass; }
Output for 7.2.29 - 7.2.32, 7.3.16 - 7.3.20, 7.4.3 - 7.4.8, 8.0.0alpha1 - beta1
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 16777224 bytes) in /in/gYbNe on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.27
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/gYbNe on line 4
Process exited with code 255.