3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { private $bar; public function baz() { var_dump($this->bar); var_dump(get_class($this->bar)); } } $foo = new Foo(); $foo->baz();
based on h2rsU
Output for 7.2.0
NULL Warning: get_class() expects parameter 1 to be object, null given in /in/dVvNX on line 10 bool(false)
Output for 5.3.18 - 7.1.10
NULL string(3) "Foo"