3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { function foo() { $this; return get_defined_vars(); } } $this; $c = new C; var_export($c->foo());
based on YkKhq
Output for 7.1.0 - 7.2.0
array ( )
Output for 5.3.20 - 7.0.20
array ( 'this' => C::__set_state(array( )), )