Skip to content

Commit

Permalink
ArrayObject::__construct Replace tag and implement → extend + CS (#4416)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalferov authored Jan 27, 2025
1 parent 7d80472 commit 0aa6447
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions reference/spl/arrayobject/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<methodparam choice="opt"><type>string</type><parameter>iteratorClass</parameter><initializer>ArrayIterator::class</initializer></methodparam>
</constructorsynopsis>
<para>
This constructs a new array <type>object</type>.
This constructs a new array <type>object</type>.
</para>
</refsect1>

Expand All @@ -27,7 +27,7 @@
<term><parameter>array</parameter></term>
<listitem>
<para>
The <parameter>array</parameter> parameter accepts an
The <parameter>array</parameter> parameter accepts an
<type>array</type> or an <type>Object</type>.
</para>
</listitem>
Expand All @@ -46,7 +46,7 @@
<listitem>
<para>
Specify the class that will be used for iteration of the <classname>ArrayObject</classname> object.
The class must implement <interfacename>ArrayIterator</interfacename>.
The class must extend the <classname>ArrayIterator</classname> class.
</para>
</listitem>
</varlistentry>
Expand All @@ -62,13 +62,17 @@
<programlisting role="php">
<![CDATA[
<?php
$array = array('1' => 'one',
'2' => 'two',
'3' => 'three');
$array = [
'1' => 'one',
'2' => 'two',
'3' => 'three'
];
$arrayobject = new ArrayObject($array);
var_dump($arrayobject);
?>
]]>
</programlisting>
Expand Down

0 comments on commit 0aa6447

Please sign in to comment.