note 111929 added to control-structures.for

From: Date: Sat, 13 Apr 2013 13:52:32 +0000
Subject: note 111929 added to control-structures.for
Groups: php.notes 
Request: Send a blank email to php-notes+get-194467@lists.php.net to get a copy of this message
Quote: first expression (expr1) is evaluated (executed) once unconditionally at the beginning of the loop. So, what use is it in the 'for' syntax? expr1 should be inserted BEFORE the loop begins, like any other statements leading up to 'for'. The loop syntax would become simpler, and less confusing (One logically expects an expression in any loop to be evaluated at every iteration.), with only expr2 and expr3 --renamed, of course, expr1 and expr2. ---- Server IP: 69.147.83.199 Probable Submitter: 186.190.3.207 ---- Manual Page -- http://php.net/manual/en/control-structures.for.php Edit -- https://master.php.net/note/edit/111929 Del: integrated -- https://master.php.net/note/delete/111929/integrated Del: useless -- https://master.php.net/note/delete/111929/useless Del: bad code -- https://master.php.net/note/delete/111929/bad+code Del: spam -- https://master.php.net/note/delete/111929/spam Del: non-english -- https://master.php.net/note/delete/111929/non-english Del: in docs -- https://master.php.net/note/delete/111929/in+docs Del: other reasons-- https://master.php.net/note/delete/111929 Reject -- https://master.php.net/note/reject/111929 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194467) next »