diff --git a/reference/spl/functions/iterator-count.xml b/reference/spl/functions/iterator-count.xml index b9ebfab8cf..b4191fe134 100755 --- a/reference/spl/functions/iterator-count.xml +++ b/reference/spl/functions/iterator-count.xml @@ -1,5 +1,5 @@ - + iterator_count @@ -12,9 +12,6 @@ intiterator_count Traversableiterator - - &warn.undocumented.func; - Count the elements in an iterator. @@ -43,6 +40,29 @@ + + &reftitle.examples; + + + <function>iterator_count</function> example + +'pancakes', 'egg', 'milk', 'flour')); +var_dump(iterator_count($iterator)); +?> +]]> + + &example.outputs; + + + + + + + + iterator_to_array @@ -13,11 +13,8 @@ Traversableiterator booluse_keystrue - - &warn.undocumented.func; - - Count the elements in an iterator. + Copy the elements of an iterator into an array. @@ -29,7 +26,7 @@ iterator - The iterator being counted. + The iterator being copied. @@ -37,7 +34,7 @@ use_keys - + Whether to use the iterator element keys as index. @@ -48,7 +45,50 @@ &reftitle.returnvalues; - The number of elements in iterator. + An array containing the elements of the iterator. + + + + + &reftitle.examples; + + + <function>iterator_to_array</function> example + +'pancakes', 'egg', 'milk', 'flour')); +var_dump(iterator_to_array($iterator, true)); +var_dump(iterator_to_array($iterator, false)); +?> +]]> + + &example.outputs; + + + string(8) "pancakes" + [0]=> + string(3) "egg" + [1]=> + string(4) "milk" + [2]=> + string(5) "flour" +} +array(4) { + [0]=> + string(8) "pancakes" + [1]=> + string(3) "egg" + [2]=> + string(4) "milk" + [3]=> + string(5) "flour" +} +]]> + +