#42535 [Opn->Bgs]: repeat() loop

From: Date: Mon, 03 Sep 2007 23:20:43 +0000
Subject: #42535 [Opn->Bgs]: repeat() loop
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117066@lists.php.net to get a copy of this message
ID: 42535 Updated by: johannes@php.net Reported By: kenaniah at gmail dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request PHP Version: 5.2.4 New Comment: There is no need for such a limited language construct. for, foreach, while, do..while, ... are enough loops. Previous Comments: ------------------------------------------------------------------------ [2007-09-03 20:27:05] kenaniah at gmail dot com Description: ------------ Granted, you can replicate this by using while($i=0;$i<$times;$i++){ //code here } but that defeats the doctrine of simplicity... Is a language construct such as repeat($times){ //code here } really that much to ask for? My proposal: <b><i>void </i>repeat (<i>$times</i>, <i>[&$counter]</i>)</b> where counter is a reference to a variable that will be incremented upon each iteration. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42535&edit=1

« previous php.bugs (#117066) next »