ID:               34040
 Updated by:       [EMAIL PROTECTED]
 Reported By:      csmar51 at free dot fr
-Status:           Closed
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Linux Fedora Core 3 & Windows XP
 PHP Version:      5CVS-2005-08-08 (dev)


Previous Comments:
------------------------------------------------------------------------

[2005-08-10 14:36:44] csmar51 at free dot fr

Ok, thaks for your answer.
I never heard of octal numbers before, that's now done.

------------------------------------------------------------------------

[2005-08-08 19:56:46] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Never heard of octal numbers, have you?


------------------------------------------------------------------------

[2005-08-08 19:55:26] csmar51 at free dot fr

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 this bug report at http://bugs.php.net/?id=34040&edit=1

Reply via email to