File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
reference/spl/arrayobject Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: takagi Status: ready -->
3
+ <!-- EN-Revision: 65c558143647fe63b8073180ba314067d5ea4b62 Maintainer: takagi Status: ready -->
4
4
<!-- CREDITS: shimooka -->
5
5
<refentry xml : id =" arrayobject.construct" xmlns =" http://docbook.org/ns/docbook" >
6
6
<refnamediv >
50
50
<classname >ArrayObject</classname > オブジェクトの反復処理に使用するクラスを指定します。
51
51
ここで指定するクラスは、
52
52
<interfacename >ArrayIterator</interfacename >
53
- を実装していなければなりません 。
53
+ の部分型でなければなりません 。
54
54
</para >
55
55
</listitem >
56
56
</varlistentry >
66
66
<programlisting role =" php" >
67
67
<![CDATA[
68
68
<?php
69
- $array = array('1' => 'one',
70
- '2' => 'two',
71
- '3' => 'three');
69
+
70
+ $array = [
71
+ '1' => 'one',
72
+ '2' => 'two',
73
+ '3' => 'three'
74
+ ];
72
75
73
76
$arrayobject = new ArrayObject($array);
74
77
75
78
var_dump($arrayobject);
79
+
76
80
?>
77
81
]]>
78
82
</programlisting >
79
83
&example.outputs;
80
84
<screen >
81
85
<![CDATA[
82
- object(ArrayObject)#1 (3) {
83
- [1]=>
84
- string(3) "one"
85
- [2]=>
86
- string(3) "two"
87
- [3]=>
88
- string(5) "three"
86
+ object(ArrayObject)#1 (1) {
87
+ ["storage":"ArrayObject":private]=>
88
+ array(3) {
89
+ [1]=>
90
+ string(3) "one"
91
+ [2]=>
92
+ string(3) "two"
93
+ [3]=>
94
+ string(5) "three"
95
+ }
89
96
}
90
97
]]>
91
98
</screen >
You can’t perform that action at this time.
0 commit comments