note 91245 added to function.iterator-apply
| From: | kminkler at synacor dot com | Date: | Tue, 02 Jun 2009 02:02:23 +0000 |
| Subject: | note 91245 added to function.iterator-apply | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156265@lists.php.net to get a copy of this message | ||
To clarify, this method does not work exactly like array_walk(), since the current key/value of the
iterator is not passed to the callback function.
This php method is equivalent to:
<?php
function iterator_apply(Traversable $iterator, $function, array $args)
{
$count = 0;
foreach ($iterator as $ignored)
{
call_user_func_array($function, $args);
$count++;
}
return $count;
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 38.97.88.20
----
Manual Page -- http://www.php.net/manual/en/function.iterator-apply.php
Edit -- https://master.php.net/note/edit/91245
Del: integrated -- https://master.php.net/note/delete/91245/integrated
Del: useless -- https://master.php.net/note/delete/91245/useless
Del: bad code -- https://master.php.net/note/delete/91245/bad+code
Del: spam -- https://master.php.net/note/delete/91245/spam
Del: non-english -- https://master.php.net/note/delete/91245/non-english
Del: in docs -- https://master.php.net/note/delete/91245/in+docs
Del: other reasons-- https://master.php.net/note/delete/91245
Reject -- https://master.php.net/note/reject/91245
Search -- https://master.php.net/manage/user-notes.php