Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42749 invoked from network); 4 Sep 2012 10:31:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2012 10:31:10 -0000 Authentication-Results: pb1.pair.com header.from=david.zuelke@bitextender.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=david.zuelke@bitextender.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bitextender.com from 80.237.132.12 cause and error) X-PHP-List-Original-Sender: david.zuelke@bitextender.com X-Host-Fingerprint: 80.237.132.12 wp005.webpack.hosteurope.de Received: from [80.237.132.12] ([80.237.132.12:37173] helo=wp005.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/0B-17715-C68D5405 for ; Tue, 04 Sep 2012 06:31:09 -0400 Received: from 178-26-196-247-dynip.superkabel.de ([178.26.196.247] helo=[192.168.178.22]); authenticated by wp005.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) id 1T8qPR-0004Cv-3F; Tue, 04 Sep 2012 12:31:05 +0200 References: <13095916.1346546580825.JavaMail.root@wamui-haziran.atl.sa.earthlink.net> <96E453F9E8B844E090D9D375033A9E53@apfelbox.net> In-Reply-To: <96E453F9E8B844E090D9D375033A9E53@apfelbox.net> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: Cc: "slevy1@pipeline.com" , "internals@lists.php.net" X-Mailer: iPhone Mail (9B206) Date: Tue, 4 Sep 2012 12:31:05 +0200 To: Jannik Zschiesche X-bounce-key: webpack.hosteurope.de;david.zuelke@bitextender.com;1346754669;eca6fa98; Subject: Re: [PHP-DEV] Re: Support negative indexes for arrays and strings From: david.zuelke@bitextender.com (=?utf-8?Q?David_Z=C3=BClke?=) On 03.09.2012, at 09:37, Jannik Zschiesche wrote: > The main problem arises from the ambiguity for $array[-1] for arrays. > But this is easily solvable: just introduce a slice operator. >=20 > $array[:-1] and the ambiguity is gone. That would return an array containing the last item as the sole member, not t= he last item itself. David