File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
reference/spl/arrayobject Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: takagi Status: ready -->
3+ <!-- EN-Revision: da11d3f56626c3d87a4933227180909676b27109 Maintainer: takagi Status: ready -->
44<!-- CREDITS: shimooka -->
55<refentry xml : id =" arrayobject.getiterator" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
3939 <programlisting role =" php" >
4040<![CDATA[
4141<?php
42- $array = array('1' => 'one',
43- '2' => 'two',
44- '3' => 'three');
42+
43+ $array = [
44+ '1' => 'one',
45+ '2' => 'two',
46+ '3' => 'three',
47+ ];
4548
4649$arrayobject = new ArrayObject($array);
4750
4851$iterator = $arrayobject->getIterator();
4952
50- while($iterator->valid()) {
53+ while ($iterator->valid()) {
5154 echo $iterator->key() . ' => ' . $iterator->current() . "\n";
5255
5356 $iterator->next();
5457}
58+
5559?>
5660]]>
5761 </programlisting >
You can’t perform that action at this time.
0 commit comments