ID: 27063 Updated by: [EMAIL PROTECTED] Reported By: adam at trachtenberg dot com Status: Assigned Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2004-01-27 (dev) Assigned To: helly New Comment:
See comment on #26946 Previous Comments: ------------------------------------------------------------------------ [2004-01-27 14:05:55] [EMAIL PROTECTED] It should simply respect property visibility. ------------------------------------------------------------------------ [2004-01-27 13:55:13] adam at trachtenberg dot com Upon further thought, it's unclear to me if Protected and Private properties should be displayed at all. Technically, the ArrayObject class has no legal way to access non-public properties as it is neither the class nor a child, but that may limit its usefulness. ------------------------------------------------------------------------ [2004-01-27 13:47:16] adam at trachtenberg dot com Description: ------------ The ArrayObject class does not correctly set protected and private property names. Reproduce code: --------------- class Test { public $public = 'Public'; protected $protected = 'Protected'; private $private = 'Private'; } foreach (new ArrayObject(new Test) as $property => $value) { print "$property: $value\n"; } Expected result: ---------------- public: Public protected: Protected private: Private Actual result: -------------- public: Public *protected: Protected Testprivate: Private ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27063&edit=1