3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getData() { $a[0] = &$a; return $a; } function recurcive(&$data) { array_slice($data, 0); $data[] = 'X'; if (end($data[0]) !== 'X') { recurcive($data[0]); } } $data = getData(); recurcive($data);
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 262144 bytes) in /in/6AASB on line 12
Process exited with code 255.

preferences:
156.87 ms | 401 KiB | 178 Q