Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38387 invoked from network); 15 Jan 2009 19:35:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2009 19:35:41 -0000 Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.170.188 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 64.233.170.188 rn-out-0910.google.com Received: from [64.233.170.188] ([64.233.170.188:16181] helo=rn-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/BE-01962-C009F694 for ; Thu, 15 Jan 2009 14:35:40 -0500 Received: by rn-out-0910.google.com with SMTP id k40so1044380rnd.0 for ; Thu, 15 Jan 2009 11:35:37 -0800 (PST) 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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=hdvJ0NEg2Pu3E8iHYLcCdW06MWXVriyrjhBM7P5EU6M=; b=fjLc5+QawSVAY9HQcQcDNZJtrDblzMCm2oJS0ZGZS9KKPfVkyYYejxL+dA2RCofXmG Uioy2xgS9dCraYyGXNPDL65ngqbItFJyNMl7g9kb8L1SrTxFau6YrvHVTJ6JF9qJN6Al 1NPILwpwvQqGyuOSDe+xI7xo09CHISS1rrDp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ER8oHE2+cqMBE68uG7eNdR2qlw+FdfXhvpbrD2HoZh9SZTMPNBAmYvASs9iTjdw8TA lZyIihAGVMyCfXv4yj7syZDwPn11FtzRC438bhKmYD2gDkp2vHspIA2O9NlPIKwCJHac S3N3TCMnXZL3ObsZ4tOoQ1ZNEZIsTAD/4eH/k= Received: by 10.151.42.12 with SMTP id u12mr4551731ybj.152.1232048137282; Thu, 15 Jan 2009 11:35:37 -0800 (PST) Received: by 10.150.200.20 with HTTP; Thu, 15 Jan 2009 11:35:37 -0800 (PST) Message-ID: Date: Thu, 15 Jan 2009 19:35:37 +0000 To: "Robert Lemke" Cc: "PHP Developers Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [PHP-DEV] Unexpected behavior of $this->$propertyName[...] From: paul.biggar@gmail.com ("Paul Biggar") On Thu, Jan 15, 2009 at 7:24 PM, Robert Lemke wrote: > Dear internals, > > please consider the following code executed with PHP 5.3alpha3: I suspect neither bug nor feature. I think you expect that $this->$propertyName['bar'] is the same as: ($this->$propertyName)['bar'] but in fact it is: $this->($propertyName['bar']) So in your example, 'bar' is the string index 0 for "foo"[0], hence 'f'. > Is this a bug or missing feature? It has been pointed out before that one should be able to index an expression, but currently PHP can only index variables. Personally, it seems like a bug, but I'm not sure whether or not there's consensus. Paul -- Paul Biggar paul.biggar@gmail.com