3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $functions = [function($a){return $a+1;}]; for ($i=1;$i<100000;$i++) { $f = $functions[$i-1]; $functions[$i] = function ($a) use ($f) { return $f($a); }; } $functions[$i](1);
based on Ue6q5
Output for 7.2.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/X8KHB on line 5
Process exited with code 255.
Output for 7.1.10

Process exited with code 137.
Output for 7.0.0 - 7.1.7
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/X8KHB on line 6
Process exited with code 139.
Output for 5.6.8 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/X8KHB on line 6
Process exited with code 255.
Output for 5.5.24 - 5.5.35
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/X8KHB on line 6
Process exited with code 255.
Output for 5.4.10 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /in/X8KHB on line 6
Process exited with code 139.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/X8KHB on line 3
Process exited with code 255.