Doc #69986 [Opn->Nab]: Foreach Documentation incorrectly implies generators cannot be used

From: Date: Mon, 06 Jul 2015 12:35:20 +0000
Subject: Doc #69986 [Opn->Nab]: Foreach Documentation incorrectly implies generators cannot be used
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12498@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69986&edit=1 ID: 69986 Updated by: bwoebi@php.net Reported by: nsalter at eandl dot co dot uk Summary: Foreach Documentation incorrectly implies generators cannot be used -Status: Open +Status: Not a bug Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Generators, just like any other sort of Traversable, are all objects. It just means that you can't use foreach on scalars. Previous Comments: ------------------------------------------------------------------------ [2015-07-03 09:14:32] nsalter at eandl dot co dot uk Description: ------------ The sentence which says "foreach works only on arrays and objects" should probably be changed to read "foreach works only on arrays, objects and generators" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69986&edit=1

« previous php.doc.bugs (#12498) next »