#27063 [Asn->Csd]: SPL: ArrayObject does not handle PPP correctly

From: Date: Sun, 25 Apr 2004 11:15:37 +0000
Subject: #27063 [Asn->Csd]: SPL: ArrayObject does not handle PPP correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-58720@lists.php.net to get a copy of this message
ID: 27063 Updated by: helly@php.net Reported By: adam at trachtenberg dot com -Status: Assigned +Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5.0.0RC2 Assigned To: helly New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2004-04-22 22:16:48] helly@php.net Here's a patch to fix the open SPL issues: http://marcus-boerger.de/php/ext/spl/spl-20040422.diff.txt It would be nice to have it tested prior to comitting it after RC2. ------------------------------------------------------------------------ [2004-02-05 16:56:46] helly@php.net See comment on #26946 ------------------------------------------------------------------------ [2004-01-27 14:05:55] helly@php.net 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

« previous php.bugs (#58720) next »