note 90734 added to control-structures.do.while

From: Date: Thu, 07 May 2009 07:33:37 +0000
Subject: note 90734 added to control-structures.do.while
Groups: php.notes 
Request: Send a blank email to php-notes+get-154298@lists.php.net to get a copy of this message
Attention C programmers! PHP documentation compares do-while loop with C/C++ usage which is completely opposite. A "forever" cycle in PHP is: <?php do{ //forever }while(0); ?> and the C/C++ "forever" cycle is: do{ // forever }while(1); I wander why: 1. PHP do-while loop differs from C/C++ when PHP's syntax is C-like 2. Why there is no warning and no one posted a note about this yet. ---- Server IP: 69.147.83.197 Probable Submitter: 94.26.21.5 ---- Manual Page -- http://www.php.net/manual/en/control-structures.do.while.php Edit -- https://master.php.net/note/edit/90734 Del: integrated -- https://master.php.net/note/delete/90734/integrated Del: useless -- https://master.php.net/note/delete/90734/useless Del: bad code -- https://master.php.net/note/delete/90734/bad+code Del: spam -- https://master.php.net/note/delete/90734/spam Del: non-english -- https://master.php.net/note/delete/90734/non-english Del: in docs -- https://master.php.net/note/delete/90734/in+docs Del: other reasons-- https://master.php.net/note/delete/90734 Reject -- https://master.php.net/note/reject/90734 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154298) next »