php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67011 Manual: Comparing generators with Iterator objects: generators cannot be cloned
Submitted: 2014-04-03 17:34 UTC Modified: 2016-05-06 13:56 UTC
From: william75 at yopmail dot com Assigned: nikic (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.5.11 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: william75 at yopmail dot com
New email:
PHP Version: OS:

 

 [2014-04-03 17:34 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-06 13:55 UTC] 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
 [2016-05-06 13:56 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2020-02-07 06:07 UTC] phpdocbot@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=19059652f1059bf80f0290c0f65870ded996a02b
Log: Fix bug #67011
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 14:00:01 2026 UTC