Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78745 invoked from network); 17 Apr 2014 16:49:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2014 16:49:39 -0000 Authentication-Results: pb1.pair.com header.from=admacedo@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=admacedo@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.176 as permitted sender) X-PHP-List-Original-Sender: admacedo@gmail.com X-Host-Fingerprint: 209.85.213.176 mail-ig0-f176.google.com Received: from [209.85.213.176] ([209.85.213.176:43826] helo=mail-ig0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/56-39661-12600535 for ; Thu, 17 Apr 2014 12:49:38 -0400 Received: by mail-ig0-f176.google.com with SMTP id uy17so2493894igb.9 for ; Thu, 17 Apr 2014 09:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=cqsvABakKnfGjOpBJsVgcAecJJB2OJnoO3CmMQe3A08=; b=ixNO3c2QHiNBqvjHqTAY8urdO60AnNp0VNcVYIw+U3y97qJpX6YnIB4zACI/PMo01V gBJqfRhUCk1UA+AQwdvP7Y0j49TwKBBptWx+JwOTXPCbVj0Zeyyw8Nt25BSs5Nkx2R8w XZSMKDKF8gFCAZ9Y1xoa5tiFaDO00HkN6sAQxX4kaS61hJ/Ff4xHd9IaKDDLqr49islg 4OeCQdAxAsajZqzGjWg4aQevBFr+P3K1usXD8dEwWrHho6WXU19THuWt222GG5ekuyRX 0wRt4CQUAldGY1SC/6TJkrO3zszntgAjVKqwUvhbxC9W/q1OR8w+fmFOwijpRT9vzw2f 6e2w== X-Received: by 10.50.50.146 with SMTP id c18mr11985716igo.42.1397753374981; Thu, 17 Apr 2014 09:49:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.17.162 with HTTP; Thu, 17 Apr 2014 09:48:54 -0700 (PDT) In-Reply-To: <5350044F.40609@heigl.org> References: <1397744009.2829.3212.camel@guybrush> <1397747255.2829.3225.camel@guybrush> <534FF26E.6070602@lerdorf.com> <838439B2-6179-4748-9EC1-525BF8D37072@seancoates.com> <534FFF3B.2020404@googlemail.com> <5350044F.40609@heigl.org> Date: Thu, 17 Apr 2014 17:48:54 +0100 Message-ID: To: Andreas Heigl Cc: Crypto Compress , PHP Developers Mailing List Content-Type: multipart/alternative; boundary=047d7bdca61e6647c904f73fd160 Subject: Re: [PHP-DEV] Negative string offsets From: admacedo@gmail.com (Daniel Macedo) --047d7bdca61e6647c904f73fd160 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I warned this would lead to the Python syntax... I'm not saying it's a bad thing, and I think it actually has it's uses! And I won't defend the "confusion" between arrays and strings because the intention should be to treat developers as smart to handle the validation of variables prior to using type-specific syntax. But those examples now make me want to simplify the substr usage with an imitation of the Python syntax, I can see the possibilities! (=3D On Thu, Apr 17, 2014 at 5:41 PM, Andreas Heigl wrote: > On 17.04.14 18:20, Crypto Compress wrote: > > "foobarbazbuz"[4:7] =3D> "barbazb" > > "foobarbazbuz"[4-7] =3D> "barb" > > "foobarbazbuz"[4,7] =3D> ["b", "b"] > > ... > > > "foobarbazbuz"[4,7,8,12] =3D> ["b", "b", "a", "z"] ? > "foobarbazbuz"[4,7-8,3:2] =3D> ["b", "ba", "ob"] ??? > "foobarbazbuz"[4:3,4] =3D> ["bar", "b"] or ["bar", "barb"] ????? > "foob=C3=A4rbuz"[5] =3D> [\xC3] or ["=C3=A4"] ???? > > Regards > > Andreas > -- > ,,, > (o o) > +---------------------------------------------------------ooO-(_)-Ooo-+ > | Andreas Heigl | > | mailto:andreas@heigl.org N 50=C2=B022'59.5" E 08=C2=B0= 23'58" | > | http://andreas.heigl.org http://hei.gl/wiFKy7 | > +---------------------------------------------------------------------+ > | http://hei.gl/root-ca | > +---------------------------------------------------------------------+ > > --047d7bdca61e6647c904f73fd160--