Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74698 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2491 invoked from network); 2 Jun 2014 10:27:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jun 2014 10:27:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.248 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.248 imap7-3.ox.privateemail.com Received: from [198.187.29.248] ([198.187.29.248:55217] helo=imap7-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/0E-15017-DA15C835 for ; Mon, 02 Jun 2014 06:27:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 18CA960382 for ; Mon, 2 Jun 2014 06:27:55 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap7.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id tR0wGi6oAy8K for ; Mon, 2 Jun 2014 06:27:55 -0400 (EDT) Received: from [192.168.0.200] (unknown [90.203.28.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 0A6A460388 for ; Mon, 2 Jun 2014 06:27:53 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: <6E3D6B3F-1BD6-42A2-B59C-12B9D6D597ED@ajf.me> Date: Mon, 2 Jun 2014 11:27:50 +0100 Content-Transfer-Encoding: quoted-printable Message-ID: <2D199B4F-8674-4C32-B1E3-3A523E4A4752@ajf.me> References: <6E3D6B3F-1BD6-42A2-B59C-12B9D6D597ED@ajf.me> To: PHP internals X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] [RFC] Bare Name Array From: ajf@ajf.me (Andrea Faulds) On 1 Jun 2014, at 18:59, Andrea Faulds wrote: > Where the key fits the profile of IS_STRING, this RFC proposes that = you can do this instead: >=20 > stringKey: 3, >=20 > Now it=92s only two characters, three including spaces, for the most = common case. It makes declaring arrays more convenient. I should note that an added bonus of passing this RFC would be that it = would clear up what syntax to use for named parameters. Currently, = syntax is up for debate.[0] I=92m unhappy with test(foo =3D> =93bar=94) = because that=92s inconsistent with arrays which do not quote bare word = names with =3D>, and I think test($foo =3D> =93bar=94) would be = confusing. By adding the bare word colon syntax, there=92d be a clear = syntax that=92s the same for both named parameters and arrays, if or = when named parameters are implemented: foobar(4, 7, foo: 3, bar: true, =93parameter with spaces=94 =3D> = =93baz=94); // Would be the same as $myParams =3D [4, 7, foo: 3, bar: true, =93parameter with spaces=94 = =3D> =93baz=94); call_user_func_array(=91foobar=92, $myParams); [0]https://wiki.php.net/rfc/named_params#syntax -- Andrea Faulds http://ajf.me/