Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74671 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29246 invoked from network); 1 Jun 2014 18:49:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2014 18:49:43 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.199 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.199 imap2-2.ox.privateemail.com Received: from [192.64.116.199] ([192.64.116.199:54500] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/52-15017-6C57B835 for ; Sun, 01 Jun 2014 14:49:42 -0400 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 72B3E5A00D9; Sun, 1 Jun 2014 14:49:30 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: Date: Sun, 1 Jun 2014 19:49:27 +0100 Cc: Stas Malyshev , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <71878B94-F83E-4787-BC5C-75F43FB00911@ajf.me> References: <6E3D6B3F-1BD6-42A2-B59C-12B9D6D597ED@ajf.me> <538B6D49.3030402@sugarcrm.com> <2F19394F-C75C-40E8-94C3-507FAA9ADE28@ajf.me> To: Rafael Kassner 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 19:47, Rafael Kassner wrote: > This causes a huge backward incompatibility: >=20 > define('KEY', 'foo'); > $data =3D array(KEY =3D> 'bar'); >=20 > Should $data have 'foo' or 'KEY' as element? AFAIK, some frameworks = use this constants in array keys. =91foo=92, I checked. Frameworks doing that should really not be, it=92s = really bad practise to rely on PHP=92s fallback for non-existent = constants, and that generates a Notice. Now you=92d have the option of doing array(KEY: =91bar=92) though, which = does not resolve the constant. -- Andrea Faulds http://ajf.me/