3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { var_dump($this); unset($this); var_dump($this); } } $f = new Foo(); $f->bar();
based on ovDEF
Output for 7.1.0 - 7.3.0rc3
Fatal error: Cannot unset $this in /in/4U5Ev on line 6
Process exited with code 255.
Output for 5.6.0 - 7.0.20
object(Foo)#1 (0) { } Notice: Undefined variable: this in /in/4U5Ev on line 7 NULL