note 127154 added to generator.key

From: Date: Sat, 04 Jun 2022 05:59:48 +0000
Subject: note 127154 added to generator.key
Groups: php.notes 
Request: Send a blank email to php-notes+get-218554@lists.php.net to get a copy of this message
This is important when considering how other Generators work such as JavaScript's an Python's. While PHP's generator has the ->valid() method they don't, or an equivalent. JS uses Iterator protocol which says next() should return an object of { done: bool, value: mixed } In which case you can use keys->done to see if the generator can still be iterated. ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.12.131 (proxied: 71.212.97.181) ---- Manual Page -- https://php.net/manual/en/generator.key.php Edit -- https://main.php.net/note/edit/127154 Del: integrated -- https://main.php.net/note/delete/127154/integrated Del: useless -- https://main.php.net/note/delete/127154/useless Del: bad code -- https://main.php.net/note/delete/127154/bad+code Del: spam -- https://main.php.net/note/delete/127154/spam Del: non-english -- https://main.php.net/note/delete/127154/non-english Del: in docs -- https://main.php.net/note/delete/127154/in+docs Del: other reasons-- https://main.php.net/note/delete/127154 Reject -- https://main.php.net/note/reject/127154 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#218554) next »