#29533 [Opn]: for($x=-11;$x++;$x<=10)

From: Date: Thu, 05 Aug 2004 10:50:28 +0000
Subject: #29533 [Opn]: for($x=-11;$x++;$x<=10)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-64126@lists.php.net to get a copy of this message
ID: 29533 User updated by: indrek at tavid dot ee Reported By: indrek at tavid dot ee Status: Open Bug Type: Variables related Operating System: windows 2000 PHP Version: 4.3.9 New Comment: and it's same withh php5 Previous Comments: ------------------------------------------------------------------------ [2004-08-05 12:48:53] indrek at tavid dot ee Description: ------------ for breaks when $x after variable value=0 Reproduce code: --------------- <?php for($x=-11;$x++;$x<=10){ echo $x.'<br>'; } ?> Expected result: ---------------- ... -5 -4 -3 -2 -1 0 1 2 3 4 ... Actual result: -------------- -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29533&edit=1

« previous php.bugs (#64126) next »