3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $hello; public function deleteMe(&$obj) { $obj = (unset) $obj; } public function hello() { echo 'hello from foo'; } public function __unset() { echo 'I been called'; } } $foo = new Foo(); var_dump($foo); $foo->deleteMe($foo); var_dump($foo);
Output for 5.3.0 - 5.4.26
Fatal error: Method Foo::__unset() must take exactly 1 argument in /in/iUFHJ on line 21
Process exited with code 255.