Yuri Taratorkin
Yuri Taratorkin

Reputation: 647

What reason of using ArrayObject::STD_PROP_LIST

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?

Upvotes: 1

Views: 1122

Answers (2)

M8R-1jmw5r
M8R-1jmw5r

Reputation: 4996

Since PHP 5.3, this flag does not have any influence any longer.

http://3v4l.org/Fk3Qu

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:

Upvotes: 7

Barmar
Barmar

Reputation: 780974

There's an example on this page in the ArrayObject documentation.

Upvotes: -1

Related Questions