3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar() { $this->a = 5; } function foo() { unset($this->a); } } $f = new foo(); $f->bar(); var_dump($f); $f->foo(); var_dump($f);

preferences:
74 ms | 404 KiB | 5 Q