note 108400 rejected from language.oop5.visibility by salathe

From: Date: Mon, 23 Apr 2012 13:18:51 +0000
Subject: note 108400 rejected from language.oop5.visibility by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187305@lists.php.net to get a copy of this message
Note Submitter: clgsru at gmail dot com ---- PHP 5.2.4 <?php class A{ public function __get($pName){ return $this->$pName; } } class B extends A{ public $public='public'; private $private='private'; protected $protected='protected'; } $b = new B(); var_dump($b->public,$b->private,$b->protected); ?> Notice: Undefined property: B::$private in /home/sites-cms/www/test.php on line 4 string(6) "public" NULL string(9) "protected" Why is this happening?

« previous php.notes (#187305) next »