#48580 [Opn->Fbk]: ArrayObject swallows properties (dump and reflection access) (PHP_5_2 only!)
| From: | jani@php.net | Date: | Sat, 19 Sep 2009 14:52:14 +0000 |
| Subject: | #48580 [Opn->Fbk]: ArrayObject swallows properties (dump and reflection access) (PHP_5_2 only!) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142570@lists.php.net to get a copy of this message | ||
ID: 48580
Updated by: jani@php.net
-Summary: ArrayObject swallows properties (dump and reflection
access)
Reported By: toby@php.net
-Status: Open
+Status: Feedback
Bug Type: SPL related
Operating System: Gentoo
PHP Version: 5.2.9
New Comment:
Still not fixed in 5.2.11..? Can you check and update the version if
not..
Previous Comments:
------------------------------------------------------------------------
[2009-06-17 10:06:40] toby@php.net
Description:
------------
Attributes defined in classes deriving from ArrayObject do not show up
in var_dump() and cannot be accessed via Reflection.
Note that this is fixed in 5.3 already.
Reproduce code:
---------------
class Bar extends ArrayObject
{
protected $foo = 23;
private $bar = 42;
}
var_dump( new Bar() );
Expected result:
----------------
object(Bar)#1 (0) {
["foo:protected"]=>
int(23)
["bar:private"]=>
int(42)
}
Actual result:
--------------
object(Bar)#1 (0) {
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48580&edit=1