Doc #67011 [Opn->Csd]: Manual: Comparing generators with Iterator objects: generators cannot be cloned

From: Date: Fri, 06 May 2016 13:56:07 +0000
Subject: Doc #67011 [Opn->Csd]: Manual: Comparing generators with Iterator objects: generators cannot be cloned
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13444@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67011&edit=1 ID: 67011 Updated by: nikic@php.net Reported by: william75 at yopmail dot com Summary: Manual: Comparing generators with Iterator objects: generators cannot be cloned -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: 5.5.11 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2016-05-06 13:55:30] nikic@php.net Automatic comment from SVN on behalf of nikic Revision: http://svn.php.net/viewvc/?view=revision&revision=339142 Log: Fix bug #67011 ------------------------------------------------------------------------ [2014-04-03 17:34:20] william75 at yopmail dot com Description: ------------ --- From manual page: http://www.php.net/language.generators.comparison --- The page http://php.net/manual/en/language.generators.comparison.php currently reads: "This also means that the same generator can't be iterated over multiple times: the generator will need to either be rebuilt by calling the generator function again, or cloned via the clone keyword." The last bit is incorrect: a generator cannot be cloned (Fatal error: Trying to clone an uncloneable object of class Generator in ...). I think you need to delete the "or cloned via the clone keyword" part (and also the "either" before). The error is also present in translations. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67011&edit=1

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