note 85865 rejected from language.oop5.iterations by danbrown

From: Date: Thu, 22 Jan 2009 14:31:44 +0000
Subject: note 85865 rejected from language.oop5.iterations by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-149658@lists.php.net to get a copy of this message
Note Submitter: odessa-gun at narod dot ru ---- This is an example how to get protected properties in global scope (php 5.2.3 Win): <?php class A { public $v1 = '1'; public $v2 = '2'; public $v3 = '3'; protected $v4 = '4'; private $v5 = '5'; } $obj = new A(); while (list($k, $str) = each($obj)) { echo '$obj->'.$k.'='.$str.'<br>'; } /*will output $obj->v1=1 $obj->v2=2 $obj->v3=3 $obj->�*�v4=4 $obj->�A�v5=5 */ ?> Is it not a bug?

« previous php.notes (#149658) next »