I don't find any example of using ArrayObject with ArrayObject::STD_PROP_LIST flag. http://www.php.net/manual/en/arrayobject.setflags.php Can you give me any example of using ArrayObject with this flag?
2 Answers
Since PHP 5.3, this flag does not have any influence any longer.
Output for 5.3.0 - 5.5.0beta2
ArrayObject Object
(
[prop] => prop data
[storage:ArrayObject:private] => Array
(
[arr] => array data
)
)
ArrayObject Object
(
[prop] => prop data
[storage:ArrayObject:private] => Array
(
[arr] => array data
)
)
Output for 5.1.0 - 5.2.17
ArrayObject Object
(
[prop] => prop data
)
ArrayObject Object
(
[arr] => array data
)
This has been also reported as a bug:
Comments
3 Comments
M8R-1jmw5r
Can you please provide an example that demonstrates how using that constant makes a difference in contrast to not using that constant? Because the documentation does not give any example.
Barmar
@M8R-1jmw5r Did you look at the page I linked to? There's a demonstration by MarkAndrewSlade that shows the difference.
M8R-1jmw5r
Thanks for the heads-up, I've used his example and it seems that this does not work any longer with current PHP versions. stackoverflow.com/a/15960458/2261774