File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
reference/spl/arrayobject Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1515 <methodparam choice =" opt" ><type >string</type ><parameter >iteratorClass</parameter ><initializer >ArrayIterator::class</initializer ></methodparam >
1616 </constructorsynopsis >
1717 <para >
18- This constructs a new array <type >object</type >.
18+ This constructs a new array <type >object</type >.
1919 </para >
2020 </refsect1 >
2121
2727 <term ><parameter >array</parameter ></term >
2828 <listitem >
2929 <para >
30- The <parameter >array</parameter > parameter accepts an
30+ The <parameter >array</parameter > parameter accepts an
3131 <type >array</type > or an <type >Object</type >.
3232 </para >
3333 </listitem >
4646 <listitem >
4747 <para >
4848 Specify the class that will be used for iteration of the <classname >ArrayObject</classname > object.
49- The class must implement < interfacename >ArrayIterator</interfacename > .
49+ The class must extend the < classname >ArrayIterator</classname > class .
5050 </para >
5151 </listitem >
5252 </varlistentry >
6262 <programlisting role =" php" >
6363<![CDATA[
6464<?php
65- $array = array('1' => 'one',
66- '2' => 'two',
67- '3' => 'three');
65+
66+ $array = [
67+ '1' => 'one',
68+ '2' => 'two',
69+ '3' => 'three'
70+ ];
6871
6972$arrayobject = new ArrayObject($array);
7073
7174var_dump($arrayobject);
75+
7276?>
7377]]>
7478 </programlisting >
You can’t perform that action at this time.
0 commit comments