From 52123c549c66b1cf2b217ae251f94762b4fb0989 Mon Sep 17 00:00:00 2001 From: divinity76 Date: Thu, 13 Mar 2025 14:42:51 +0100 Subject: [PATCH] objects does not have to be Traversable to be ForEach'ed. fix https://github.com/php/doc-en/issues/4534 --- language/control-structures/foreach.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/control-structures/foreach.xml b/language/control-structures/foreach.xml index 260188f35bc9..d2f6b1872b5a 100644 --- a/language/control-structures/foreach.xml +++ b/language/control-structures/foreach.xml @@ -5,7 +5,7 @@ The foreach construct provides an easy way to - iterate over arrays and Traversable objects. + iterate over arrays and objects. foreach will issue an error when used with a variable containing a different data type or with an uninitialized variable.