Re: Bug #12737: index bug concerning "00" and "08"
| From: | Adam Wright | Date: | Tue, 14 Aug 2001 10:14:44 +0000 |
| Subject: | Re: Bug #12737: index bug concerning "00" and "08" | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-63149@lists.php.net to get a copy of this message | ||
0n defines octal representation (which is why 00 though 08 go 'wrong'). See
http://php.net/manual/en/language.types.integer.php
So, this isn't a bug in PHP.
adamw
----- Original Message -----
From: <mwijnen@cs.uu.nl>
To: <php-dev@lists.php.net>
Sent: Tuesday, August 14, 2001 11:03 AM
Subject: [PHP-DEV] Bug #12737: index bug concerning "00" and "08"
> From: mwijnen@cs.uu.nl
> Operating system: Linux 2.2.19 #10 SMP i686
> PHP version: 4.0.5
> PHP Bug Type: Arrays related
> Bug description: index bug concerning "00" and "08"
>
> Using 0 padded integers as index for an array:
> - does not work for 0 and 8
> - scrambles the order of the elements
>
> -------
> $a[00] = "string0";
> $a[01] = "string1";
> $a[02] = "string2";
> $a[03] = "string3";
> $a[04] = "string4";
> $a[05] = "string5";
> $a[06] = "string6";
> $a[07] = "string7";
> $a[08] = "string8";
> $a[09] = "string9";
>
> echo implode(";", $a);
> --------
>
> This yields:
>
> string9;string1;string2;string3;string4;string5;string6;string7
> --
> Edit bug report at: http://bugs.php.net/?id=12737&edit=1
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>