3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $_b; function __construc($b) { $this->_b = $b; } function __get($name) { echo "get $name \n"; return $this->{'_' . $name}; } function __isset($name) { echo "isset $name\n"; return true; } } class B { private $_c; function __construc($c) { $this->_c = $c; } function __get($name) { echo "get $name \n"; return $this->{'_' . $name}; } function __isset($name) { echo "isset $name\n"; return true; } } $c = new B('plop'); $b = new B($c); $a = new A($b); var_dump(isset($a->b->c));

preferences:
51.49 ms | 402 KiB | 5 Q