[DOC-CVS] [doc-en] master: Clarify array_walk_recursive() behavior for objects (#4935)
[email protected] (Tisza Gergő via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Tisza Gergő (tgr) Committer: GitHub (web-flow) Pusher: lacatoire Date: 2026-08-19T11:32:01+02:00 Commit: https://github.com/php/doc-en/commit/63f09f4d816aa29c3f8fba9d12a8c6ce2f1755de Raw diff: https://github.com/php/doc-en/commit/63f09f4d816aa29c3f8fba9d12a8c6ce2f1755de.diff Clarify array_walk_recursive() behavior for objects (#4935) * Clarify array_walk_recursive() behavior for objects Document how array_walk_recursive() walks through objects. * Use simpara for the paragraph added by this change --------- Co-authored-by: lacatoire <[email protected]> Changed paths: M reference/array/functions/array-walk-recursive.xml Diff: diff --git a/reference/array/functions/array-walk-recursive.xml b/reference/array/functions/array-walk-recursive.xml index 79f4c68e633f..209b4180e0e2 100644 --- a/reference/array/functions/array-walk-recursive.xml +++ b/reference/array/functions/array-walk-recursive.xml @@ -18,6 +18,13 @@ element of the <parameter>array</parameter>. This function will recurse into deeper arrays. </para> + <simpara> + Passing an object as the <parameter>array</parameter> is allowed, and will be + treated as if it had been + <link linkend="language.types.array.casting">cast</link> to an array first. + Regardless of whether the function started with an array or an object, it + will not recurse into inner objects. + </simpara> </refsect1> <refsect1 role="parameters"> &reftitle.parameters;