<?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);
- Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- 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.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
- 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.
preferences:
336.5 ms | 402 KiB | 376 Q