File tree 1 file changed +10
-6
lines changed
reference/spl/arrayobject
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 15
15
<methodparam choice =" opt" ><type >string</type ><parameter >iteratorClass</parameter ><initializer >ArrayIterator::class</initializer ></methodparam >
16
16
</constructorsynopsis >
17
17
<para >
18
- This constructs a new array <type >object</type >.
18
+ This constructs a new array <type >object</type >.
19
19
</para >
20
20
</refsect1 >
21
21
27
27
<term ><parameter >array</parameter ></term >
28
28
<listitem >
29
29
<para >
30
- The <parameter >array</parameter > parameter accepts an
30
+ The <parameter >array</parameter > parameter accepts an
31
31
<type >array</type > or an <type >Object</type >.
32
32
</para >
33
33
</listitem >
46
46
<listitem >
47
47
<para >
48
48
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 .
50
50
</para >
51
51
</listitem >
52
52
</varlistentry >
62
62
<programlisting role =" php" >
63
63
<![CDATA[
64
64
<?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
+ ];
68
71
69
72
$arrayobject = new ArrayObject($array);
70
73
71
74
var_dump($arrayobject);
75
+
72
76
?>
73
77
]]>
74
78
</programlisting >
You can’t perform that action at this time.
0 commit comments