note 108400 added to language.oop5.visibility

From: Date: Mon, 23 Apr 2012 11:38:52 +0000
Subject: note 108400 added to language.oop5.visibility
Groups: php.notes 
Request: Send a blank email to php-notes+get-187294@lists.php.net to get a copy of this message
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? ---- Server IP: 69.147.83.197 Probable Submitter: 194.143.150.134 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.visibility.php Edit -- https://master.php.net/note/edit/108400 Del: integrated -- https://master.php.net/note/delete/108400/integrated Del: useless -- https://master.php.net/note/delete/108400/useless Del: bad code -- https://master.php.net/note/delete/108400/bad+code Del: spam -- https://master.php.net/note/delete/108400/spam Del: non-english -- https://master.php.net/note/delete/108400/non-english Del: in docs -- https://master.php.net/note/delete/108400/in+docs Del: other reasons-- https://master.php.net/note/delete/108400 Reject -- https://master.php.net/note/reject/108400 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187294) next »