|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-08 19:56 UTC] sniper@php.net
[2005-08-10 14:36 UTC] csmar51 at free dot fr
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 05:00:01 2025 UTC |
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) }