From:             kervala at jpopdb dot net
Operating system: Linux 2.4
PHP version:      5.1.1
PHP Bug Type:     Variables related
Bug description:  Bug with some syntaxes in for loops

Description:
------------
For my site, I used a piece of code which always worked fine. (see below)

It's a simple PHP code using a "for" loop and variables manipulation.


Reproduce code:
---------------
for($i=date("Y")+1; $i>=1970; $years[$i] = $i--);
        
print_r($years);


Expected result:
----------------
In all previous PHP versions, it returned :

2006 => 2006,
2005 => 2005,
etc...


Actual result:
--------------
It now returns :

2005 => 2006,
2004 => 2005,
etc...


-- 
Edit bug report at http://bugs.php.net/?id=35545&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35545&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35545&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35545&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35545&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35545&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35545&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35545&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35545&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35545&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35545&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35545&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35545&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35545&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35545&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35545&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35545&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35545&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35545&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35545&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35545&r=mysqlcfg

Reply via email to