Bug #12737 Updated: index bug concerning "00" and "08"

From: Date: Tue, 14 Aug 2001 10:26:15 +0000
Subject: Bug #12737 Updated: index bug concerning "00" and "08"
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-63150@lists.php.net to get a copy of this message
ID: 12737 Updated by: derick Reported By: mwijnen@cs.uu.nl Old Status: Open Status: Bogus Bug Type: Arrays related Operating System: Linux 2.2.19 #10 SMP i686 PHP Version: 4.0.5 New Comment: Not a bug, 09 is interpreted as octal, and octal 08/09 does not exist. Derick Previous Comments: ------------------------------------------------------------------------ [2001-08-14 06:03:11] mwijnen@cs.uu.nl 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 this bug report at http://bugs.php.net/?id=12737&edit=1

« previous php.dev (#63150) next »