3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($n, $s, $o) { if ($n === 0) { throw new Exception("LEAK STUFF."); } foo($n-1, $s, $o); } class Key { private $key; function __construct($key) { $this->key = $key; } } $key_s = "HELLO WORLD"; $key_o = new Key("GOODBYE WORLD"); foo(3, $key_s, $key_o);
based on X1nPu
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: LEAK STUFF. in /in/Abue1:6 Stack trace: #0 /in/Abue1(9): foo(0, 'HELLO WORLD', Object(Key)) #1 /in/Abue1(9): foo(1, 'HELLO WORLD', Object(Key)) #2 /in/Abue1(9): foo(2, 'HELLO WORLD', Object(Key)) #3 /in/Abue1(24): foo(3, 'HELLO WORLD', Object(Key)) #4 {main} thrown in /in/Abue1 on line 6
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'LEAK STUFF.' in /in/Abue1:6 Stack trace: #0 /in/Abue1(9): foo(0, 'HELLO WORLD', Object(Key)) #1 /in/Abue1(9): foo(1, 'HELLO WORLD', Object(Key)) #2 /in/Abue1(9): foo(2, 'HELLO WORLD', Object(Key)) #3 /in/Abue1(24): foo(3, 'HELLO WORLD', Object(Key)) #4 {main} thrown in /in/Abue1 on line 6
Process exited with code 255.