mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Clarified the use of reset() for array_walk().
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@17259 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e25d1259b3
commit
fdbd42daea
1 changed files with 9 additions and 2 deletions
|
@ -708,7 +708,12 @@ array_values($array); // returns array("XL", "gold")
|
|||
|
||||
<note>
|
||||
<para>
|
||||
Passing the key and userdata to <parameter>func</parameter> was added in 4.0.</para>
|
||||
Passing the key and userdata to <parameter>func</parameter> was
|
||||
added in 4.0.</para>
|
||||
<para>
|
||||
In PHP 4 <function>reset</function> needs to be called as
|
||||
necessary since <function>array_walk</function> does not reset
|
||||
the array by default.</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
|
@ -726,7 +731,9 @@ function test_print( $item2, $key ) {
|
|||
}
|
||||
|
||||
array_walk( $fruits, 'test_print' );
|
||||
reset($fruits);
|
||||
array_walk( $fruits, 'test_alter', 'fruit' );
|
||||
reset($fruits);
|
||||
array_walk( $fruits, 'test_print' );
|
||||
</programlisting>
|
||||
</example></para>
|
||||
|
@ -1823,7 +1830,7 @@ sgml-always-quote-attributes:t
|
|||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../manual.ced"
|
||||
sgml-default-dtd-file:"../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
|
|
Loading…
Reference in a new issue