diff --git a/reference/spl/arrayobject/construct.xml b/reference/spl/arrayobject/construct.xml index 2badbd1354e6..9b7dc2c64a71 100644 --- a/reference/spl/arrayobject/construct.xml +++ b/reference/spl/arrayobject/construct.xml @@ -15,7 +15,7 @@ stringiteratorClassArrayIterator::class - This constructs a new array object. + This constructs a new array object. @@ -27,7 +27,7 @@ array - The array parameter accepts an + The array parameter accepts an array or an Object. @@ -46,7 +46,7 @@ Specify the class that will be used for iteration of the ArrayObject object. - The class must implement ArrayIterator. + The class must extend the ArrayIterator class. @@ -62,13 +62,17 @@ 'one', - '2' => 'two', - '3' => 'three'); + +$array = [ + '1' => 'one', + '2' => 'two', + '3' => 'three' +]; $arrayobject = new ArrayObject($array); var_dump($arrayobject); + ?> ]]>