From 9a5f30aaa46a84273c5416141c11160ade281aab Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sat, 7 Apr 2018 22:06:57 +0000 Subject: [PATCH] Fix #75546: Clarification for how iterator_apply's $args are passed to the $function This also integrates user note 121897. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344631 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/functions/iterator-apply.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/reference/spl/functions/iterator-apply.xml b/reference/spl/functions/iterator-apply.xml index 8000a6c035..94c236c9e8 100644 --- a/reference/spl/functions/iterator-apply.xml +++ b/reference/spl/functions/iterator-apply.xml @@ -13,7 +13,7 @@ intiterator_apply Traversableiterator callablefunction - arrayargs + arrayargs&null; Calls a function for every element in an iterator. @@ -28,7 +28,7 @@ iterator - The class to iterate over. + The iterator object to iterate over. @@ -37,6 +37,9 @@ The callback function to call on every element. + This function only receives the given args, so it + is nullary by default. If count($args) === 3, for + instance, the callback function is ternary. The function must return &true; in order to @@ -50,7 +53,9 @@ args - Arguments to pass to the callback function. + An array of arguments; each element of + args is passed to the callback + function as separate argument.