From:             t...@php.net
Operating system: Gentoo
PHP version:      5.2.9
PHP Bug Type:     SPL related
Bug description:  ArrayObject swallows properties (dump and reflection access)

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 bug report at http://bugs.php.net/?id=48580&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48580&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48580&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48580&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48580&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48580&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48580&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48580&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48580&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48580&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48580&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48580&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48580&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48580&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48580&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48580&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48580&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48580&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48580&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48580&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48580&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48580&r=mysqlcfg

Reply via email to