Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9584 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8105 invoked by uid 1010); 27 Apr 2004 11:34:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8080 invoked from network); 27 Apr 2004 11:34:50 -0000 Received: from unknown (HELO xaxa.search.ch) (195.141.85.117) by pb1.pair.com with SMTP; 27 Apr 2004 11:34:50 -0000 Received: from localhost (localhost [127.0.0.1]) by xaxa.search.ch (Postfix) with ESMTP id 206E96CFB6; Tue, 27 Apr 2004 13:34:50 +0200 (CEST) Received: by xaxa.search.ch (Postfix, from userid 65534) id 127FF6CFA2; Tue, 27 Apr 2004 13:34:49 +0200 (CEST) Received: from cschneid.com (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by xaxa.search.ch (Postfix) with ESMTP id 2B4426CF93; Tue, 27 Apr 2004 13:34:48 +0200 (CEST) Message-ID: <408E4557.4010303@cschneid.com> Date: Tue, 27 Apr 2004 13:34:47 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 X-Accept-Language: en-us, en, de-ch MIME-Version: 1.0 To: Marcus Boerger Cc: Andi Gutmans , Curt Zirzow , internals@lists.php.net References: <20040427034900.GA31042@bagend.shire> <5.1.0.14.2.20040427104915.02509f58@127.0.0.1> <408E33F4.6050902@cschneid.com> <1719688150.20040427132507@marcus-boerger.de> In-Reply-To: <1719688150.20040427132507@marcus-boerger.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on xaxa.search.ch X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Virus-Scanned: by AMaViS 0.3.12pre8 Subject: Re: [PHP-DEV] Illegal use of string offset From: cschneid@cschneid.com (Christian Schneider) Marcus Boerger wrote: >>[ $a = 'foo'; $a['bar'] = 42; has an even weirder behaviour: It results >>in the string '4oo'... ] > > That's a pretty. It is using 'bar' as a sting index to 'foo' and to do > this it needs to convert 'bar' to an integer. The rest is obvious. So you find it obvious that 42 is cast to string and the first character is used as replacement? Wasn't obvious to me before I tried it :-) > I think we should make [] as string offset an E_STRICT or even E_ERROR > because it confuses far too many people especially since we generally E_ERROR would be a big BC break I guess. E_STRICT sounds fine to me. - Chris