Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56904 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19639 invoked from network); 13 Dec 2011 09:28:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2011 09:28:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 87.106.212.190 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 87.106.212.190 s15355703.onlinehome-server.info Linux 2.6 Received: from [87.106.212.190] ([87.106.212.190:53028] helo=s15355703.onlinehome-server.info) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/B0-12835-3AA17EE4 for ; Tue, 13 Dec 2011 04:28:04 -0500 Received: from Hwhost2.local (unknown [194.57.88.179]) by s15355703.onlinehome-server.info (Postfix) with ESMTPA id 9A897E40A6; Tue, 13 Dec 2011 10:26:07 +0100 (CET) Message-ID: <4EE71A9F.3070609@hoa-project.net> Date: Tue, 13 Dec 2011 10:27:59 +0100 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Morfi CC: Laruence , PHP Internals , Nikita Popov References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC]Call for voting about const array/string dereference From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") Hi all, On Tue Dec 13 09:32:43 2011, Morfi wrote: >> >> echo "foobar"["foo"][0]; > > > "foobar"["foo"] - Why not "undefined index"? Exactly. The index/key "foo" does not really exist in the string "foobar" because a string is more an indexed array of characters than a combination of substrings (as the key "foo" could suggest). "foobar"[3] has a well-defined meaning, but "foobar"["foo"] sounds strange for me :-). Which semantics do you attached to this syntax? Cheers. -- Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ PhD. student at LIFC/DISC (Vesontio) and INRIA (Cassis) http://lifc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/