Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73719 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59327 invoked from network); 17 Apr 2014 14:13:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2014 14:13:50 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:57703] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/A2-39661-C91EF435 for ; Thu, 17 Apr 2014 10:13:49 -0400 Received: from [192.168.2.31] (ppp-188-174-41-40.dynamic.mnet-online.de [188.174.41.40]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id D0F8F3FE8F; Thu, 17 Apr 2014 16:14:36 +0200 (CEST) To: Leigh Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 17 Apr 2014 16:13:29 +0200 Message-ID: <1397744009.2829.3212.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Negative string offsets From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Thu, 2014-04-17 at 13:01 +0100, Leigh wrote: > What are peoples thoughts on allowing negative string offsets, that return > characters from the end of a string. I'm +/-0 on this. But mind: Current form makes it simpler to find bugs when miscalculating the offset. Allowing negative offsets gives harder to debug results. Additionally I wonder how often this is actually needed, thus justifying to change the language rules. johannes