3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { function __construct() { $a =& $this; $a = new stdClass; var_dump($this->foo()); } function foo(){ return __METHOD__; } } var_dump(new a);
based on h64j1
Output for 5.0.0 - 7.2.0
string(6) "a::foo" object(a)#1 (0) { }
Output for 4.3.0 - 4.4.9
object(a)(0) { }