Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40661 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93735 invoked from network); 24 Sep 2008 12:04:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2008 12:04:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=troelskn@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=troelskn@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.44.30 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: troelskn@gmail.com X-Host-Fingerprint: 74.125.44.30 yx-out-2324.google.com Received: from [74.125.44.30] ([74.125.44.30:10470] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/C7-52685-BBC2AD84 for ; Wed, 24 Sep 2008 08:04:12 -0400 Received: by yx-out-2324.google.com with SMTP id 3so411071yxj.83 for ; Wed, 24 Sep 2008 05:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=UDNp7Lf42SG03C8JXX2LfUpg01ljWVwNaBKBETARr2Q=; b=jg33lnyHwbdHXKJf7nW0AgXXueptSDtIIQSfi7UKQgPquoVIrmG8ElWubmU4IbaaIw 4churWdnfaexw2tcUTaEa5ooOWtL+YmhE38GqzLuUTluydJlUGDfZJhbI6lgf292ckto x4Cyqr0KWqKCh8FueFmJFAqxRsOOLv1b3lUUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=B4tWMjdLDNMiTIfx3SgnbBoVYk59Vs2S9tRm9L4J+GoVvEfWV0YmiDkiJEi/H8sFcr ZDyXmAbNxHgjStfANkU5M1lBGbx7BNZWDTqAW4F8UWyhiaFJOv2pj1L9KL6Evo24QHdS mrxsQZA0WtrhrWn+65G5Xzq1KVyLTB5vsgbPw= Received: by 10.142.230.11 with SMTP id c11mr2488911wfh.334.1222257848743; Wed, 24 Sep 2008 05:04:08 -0700 (PDT) Received: by 10.142.110.9 with HTTP; Wed, 24 Sep 2008 05:04:08 -0700 (PDT) Message-ID: <98b8086f0809240504v337b82cau302e9f47a793e466@mail.gmail.com> Date: Wed, 24 Sep 2008 14:04:08 +0200 To: "php-dev List" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Associative array syntax question? From: troelskn@gmail.com ("troels knak-nielsen") I just realised that his is valid PHP: 42, 'foo' => 53)); Producing the following output: array(1) { ["foo"]=> int(53) } I can anticipate that there may be practical reasons for this "feature", but I can't think up any scenario, where it wouldn't be a programming error to statically declare an associative array with the same key multiple times. Is this a bug or a known quirk? Should I file a bug-report on it? -- troels