I'm trying to understand STD_PROP_LIST constant in the documentation but so far i didn´t understand it, and didn´t found any explanation :( The documentation has the following example:
$a = new ArrayObject(array(), ArrayObject::STD_PROP_LIST);
$a['arr'] = 'array data';
$a->prop = 'prop data';
$b = new ArrayObject();
$b['arr'] = 'array data';
$b->prop = 'prop data';
// ArrayObject Object
// (
// [prop] => prop data
// )
print_r($a);
// ArrayObject Object
// (
// [arr] => array data
// )
print_r($b);
Both prints give me the same exact result:
ArrayObject Object ( [prop] => prop data [storage:ArrayObject:private] => Array ( [arr] => array data ) )
ArrayObject Object ( [prop] => prop data [storage:ArrayObject:private] => Array ( [arr] => array data ) )
Anyone could help me understanding what is the difference between using this constant or not?
Thanks in advance!