Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85325 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14955 invoked from network); 20 Mar 2015 20:27:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 20:27:55 -0000 Authentication-Results: pb1.pair.com header.from=bowersbros@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bowersbros@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.177 as permitted sender) X-PHP-List-Original-Sender: bowersbros@gmail.com X-Host-Fingerprint: 74.125.82.177 mail-we0-f177.google.com Received: from [74.125.82.177] ([74.125.82.177:32921] helo=mail-we0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/38-64120-AC28C055 for ; Fri, 20 Mar 2015 15:27:55 -0500 Received: by weop45 with SMTP id p45so90704094weo.0 for ; Fri, 20 Mar 2015 13:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZWPg0tdBvtpro4nWnT5QJHUi2y95GFda1dlH38Xyu0Q=; b=BBAPvupo6/KkSc0Crvd4cPOfePBeaNPhJsRSVCEoCTMuhCjCz6BvJHtpXM/YFVBmte 8gWe34fN06WALkWQztgGdCZC6sGaGj9nlcgG7xm6ttvs4wzyV1877fm9ayWxDpJSrVgP SkEuru/pEIYNQOQ1zcwTuI+aGYDe/mXxOMbaM6YOvGI7LJ6PXwh0erWUvHEvWs8CdEBR 5RI37mpuhg7UIf6WOvJpARzZGy/nb5Lv3QLezSCe6N6MLpFPEzxHk1fcTbLUEStLSjVO 80FOhjghpMZRWNzIyT0LR60syM3xVf4jlBVmyV2L+MhDSHC6+hqSpe/ltie+U2jPnXQF 7CwA== MIME-Version: 1.0 X-Received: by 10.194.221.100 with SMTP id qd4mr160645562wjc.113.1426883271992; Fri, 20 Mar 2015 13:27:51 -0700 (PDT) Received: by 10.28.62.84 with HTTP; Fri, 20 Mar 2015 13:27:51 -0700 (PDT) In-Reply-To: <080AC5EA-978C-44F8-81EE-789A2CBEE15A@seancoates.com> References: <550B5A81.1090706@gmail.com> <550B7189.4040608@gmail.com> <7486C296-7535-4633-AFE2-02E7BBC67BC5@gmail.com> <550C1176.9050307@gmail.com> <550C1AE4.8090607@gmail.com> <550C1EC3.8000106@gmail.com> <550C317E.8020508@gmail.com> <550C6422.6080009@gmail.com> <23A888B3-4493-4720-A275-D820F8E07F58@zort.net> <080AC5EA-978C-44F8-81EE-789A2CBEE15A@seancoates.com> Date: Fri, 20 Mar 2015 20:27:51 +0000 Message-ID: To: Sean Coates Cc: John Bafford , Rowan Collins , Leigh , PHP Internals Content-Type: multipart/alternative; boundary=001a11c3aa74902ecd0511be2635 Subject: Re: [PHP-DEV] RFC - Array slice syntactic sugar From: bowersbros@gmail.com (Alex Bowers) --001a11c3aa74902ecd0511be2635 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 20 March 2015 at 20:10, Sean Coates wrote: > That=E2=80=99s no different than `@` being invalid because it=E2=80=99s a= lready in use. The syntax would be [*from:to], which would currently throw a parse error (since asterisk is required to be placed between two numbers), so this would be different. Alternatively, an underscore could be used This would then look like [_from:to] Also, another option would be to not use the square bracket syntax at all, and move towards angled brackets for positional indexing. This would then be $array<1:2> to get items in positions 1 and 2. --001a11c3aa74902ecd0511be2635--