Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85324 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13010 invoked from network); 20 Mar 2015 20:17:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 20:17:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=jbafford@zort.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jbafford@zort.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zort.net designates 96.241.205.2 as permitted sender) X-PHP-List-Original-Sender: jbafford@zort.net X-Host-Fingerprint: 96.241.205.2 nova.zort.net Received: from [96.241.205.2] ([96.241.205.2:40121] helo=nova.zort.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/D7-64120-C508C055 for ; Fri, 20 Mar 2015 15:17:33 -0500 Received: from [10.0.1.2] (pulsar.zort.net [96.241.205.6]) (authenticated bits=0) by nova.zort.net (8.14.5/8.14.5) with ESMTP id t2KKHPd8010264 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 20 Mar 2015 16:17:26 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <080AC5EA-978C-44F8-81EE-789A2CBEE15A@seancoates.com> Date: Fri, 20 Mar 2015 16:17:25 -0400 Cc: Alex Bowers , Rowan Collins , Leigh , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <68EA4C07-3543-4133-9795-9AAC5F87D01F@zort.net> 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-D820F8E07F! 58@zort.net> <080AC5EA-978C-44F8-81EE-789A2CBEE15A@seancoates.com> To: Sean Coates X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] RFC - Array slice syntactic sugar From: jbafford@zort.net (John Bafford) On Mar 20, 2015, at 16:10, Sean Coates wrote: >> I posted four suggestions earlier, >>=20 >> They were: >>=20 >> @ >> & >> * >> ^ >>=20 >> My favourites are the asterisk or caret. >=20 > That=E2=80=99s no different than `@` being invalid because it=E2=80=99s = already in use. >=20 > $ php -a > Interactive shell >=20 > php > define('a', 1); > php > define('b', 2); > php > echo @a . "\n"; > 1 > php > echo (a&b) . "\n"; > 0 > php > echo (a*b) . "\n"; > 2 > php > echo (a^b) . "\n"; > 3 > php > >=20 > However: `=E2=98=83` has a long history of being available to PHP. >=20 > S >=20 There=E2=80=99s no existing unary form of * and ^, though, so I think = they=E2=80=99d both be available in this context (^ is my preference). Overloading unary & would probably also work in this context, but = personally, I think that & is too overused. -John=