note 112525 added to language.generators.comparison

From: Date: Wed, 26 Jun 2013 10:06:13 +0000
Subject: note 112525 added to language.generators.comparison
Groups: php.notes 
Request: Send a blank email to php-notes+get-195358@lists.php.net to get a copy of this message
"the following function and class are equivalent" Why? How do i get the current key when i use the generator? How to rewind? What if we do this?: while($infileFilePath=getLinesFromFile($fileName1)){ while($subInfileFilePath=getLinesFromFile($infileFilePath)){ echo $subInfileFilePath; } } # note: $fileHandle is set when calling second time 'getLinesFromFile'? Just do : $lines = file($fileName1); and please make an real example or explain it more ... thnx ---- Server IP: 213.172.110.14 Probable Submitter: 87.193.233.146 ---- Manual Page -- http://php.net/manual/en/language.generators.comparison.php Edit -- https://master.php.net/note/edit/112525 Del: integrated -- https://master.php.net/note/delete/112525/integrated Del: useless -- https://master.php.net/note/delete/112525/useless Del: bad code -- https://master.php.net/note/delete/112525/bad+code Del: spam -- https://master.php.net/note/delete/112525/spam Del: non-english -- https://master.php.net/note/delete/112525/non-english Del: in docs -- https://master.php.net/note/delete/112525/in+docs Del: other reasons-- https://master.php.net/note/delete/112525 Reject -- https://master.php.net/note/reject/112525 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195358) next »