From: csmar51 at free dot fr Operating system: Linux Fedora Core 3 & Windows XP PHP version: 5CVS-2005-08-08 (dev) PHP Bug Type: Unknown/Other Function Bug description: using 08 and 09 as integer
Description: ------------ When we assign 08 or 09 has a variable (or in an array), this one registers only 0. While with 01, 02, etc, this problem does not appear. This is also reproducible everytime you use 08 or 09 as integer. This arises with different versions of php: 4CVS-2005-08-08, 5.0.4, 5CVS-2005-08-08, 5.1.0b3. Either with a modified or default configuration. PHP configure line: ./configure --prefix=/www/php ./configure --prefix=/www/php --with-apxs=/www/apache/bin/apxs --with-config-file-path=/www/apache/conf/ --enable-versioning --with-mm=/usr --with-libxml-dir=/usr --enable-ftp --with-gd=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf --with-mysql=/www/mysql --with-mysql-sock --enable-sockets --enable-shared --enable-static Reproduce code: --------------- <? $mon_array = array('Jan'=>01, 'Feb'=>02, 'Mar'=>03, 'Apr'=>04, 'May'=>05, 'Jun'=>06, 'Jul'=>07, 'Aug'=>08, 'Sep'=>09, 'Oct'=>10, 'Nov'=>11, 'Dec'=>12); var_dump($mon_array); ?> Expected result: ---------------- array(12) { ["Jan"]=> int(1) ["Feb"]=> int(2) ["Mar"]=> int(3) ["Apr"]=> int(4) ["May"]=> int(5) ["Jun"]=> int(6) ["Jul"]=> int(7) ["Aug"]=> int(8) ["Sep"]=> int(9) ["Oct"]=> int(10) ["Nov"]=> int(11) ["Dec"]=> int(12) } Actual result: -------------- array(12) { ["Jan"]=> int(1) ["Feb"]=> int(2) ["Mar"]=> int(3) ["Apr"]=> int(4) ["May"]=> int(5) ["Jun"]=> int(6) ["Jul"]=> int(7) ["Aug"]=> int(0) ["Sep"]=> int(0) ["Oct"]=> int(10) ["Nov"]=> int(11) ["Dec"]=> int(12) } -- Edit bug report at http://bugs.php.net/?id=34040&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34040&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34040&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34040&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34040&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34040&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34040&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34040&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34040&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34040&r=support Expected behavior: http://bugs.php.net/fix.php?id=34040&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34040&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34040&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34040&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34040&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34040&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34040&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34040&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34040&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34040&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34040&r=mysqlcfg