From:             klaussantana at gmail dot com
Operating system: All
PHP version:      Irrelevant
Package:          SPL related
Bug Type:         Feature/Change Request
Bug description:ArrayObject applied deep inside the array

Description:
------------
New flag to ArrayObject: DEEP_CONVERSION.

This flag would make ArrayObject inspect the array $input indexes for
others 
arrays and also instantiate an ArrayObject with the index array also with
the same 
$flags and the same $iterator_class.

Test script:
---------------
<?php

$Array = array();

$Array['string'] = 'string';

$Array['array'] = array();
$Array['array'][] = 'string';
$Array['array'][] = 'string';
$Array['array'][] = 'string';

$Array['matrix'] = array();

$Array['matrix']['string1'] = 'string';
$Array['matrix']['string2'] = 'string';
$Array['matrix'][]          = 'string';
$Array['matrix'][]          = 'string';
$Array['matrix']['array1']  = array();
$Array['matrix']['array1'][]         = 'string';
$Array['matrix']['array1'][]         = $Array['array'];
$Array['matrix']['array1'][]         = 'string';
$Array['matrix']['array1']['string'] = 'string';
$Array['matrix']['array2']  = array();
$Array['matrix']['matrix']  = array();
$Array['matrix']['matrix']['array'] = $Array['matrix']['array1'];
$Array['matrix']['matrix'][]        = $Array['matrix']['matrix']['array'];
$Array['matrix']['string3'] = 'string';
$Array['matrix'][] = null;

$Array = new ArrayObject($Array, ArrayObject::ARRAY_AS_PROPS);

echo $Array->matrix->matrix[0][1][0];

?>

Expected result:
----------------
string

Actual result:
--------------
(!) Notice: Trying to get property of non-object in D:\WWW\sandbox.php on
line 32

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62662&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62662&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62662&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62662&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62662&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62662&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62662&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62662&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62662&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62662&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62662&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62662&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62662&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62662&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62662&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62662&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62662&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62662&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62662&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62662&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62662&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62662&r=mysqlcfg

Reply via email to