1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php class A { private $foo; } class B extends A { public function __construct () { $this->foo = true; var_dump( isset( $this->foo ) ); var_dump( $this->foo ); } } $class = new B();
1 2
bool(true) bool(true)