mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix/improve wording
To detect whether the array pointer points beyond the end, we have to check whether key() returns NULL (not the opposite). We also reword to match reset() (r343965). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344002 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
eccca2de38
commit
8b3858be3e
2 changed files with 3 additions and 4 deletions
|
@ -76,8 +76,7 @@ $mode = end($transport); // $mode = 'plane';
|
|||
</simpara>
|
||||
<simpara>
|
||||
To still use <function>next</function> and properly check if the end of the array
|
||||
has been reached, the <function>key</function> of the <function>next</function>
|
||||
element should be checked to be strictly different from &null;.
|
||||
has been reached, verify that the <function>key</function> is &null;.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
|
|
@ -69,8 +69,8 @@ $mode = end($transport); // $mode = 'plane';
|
|||
<simpara>
|
||||
The beginning of an array is indistinguishable from a
|
||||
<type>boolean</type> &false; element. To make the distinction, check that
|
||||
the <function>key</function> of the <function>prev</function> element is
|
||||
strictly different from <type>null</type>.
|
||||
the <function>key</function> of the <function>prev</function> element is not
|
||||
&null;.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
|
Loading…
Reference in a new issue