Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34553 invoked from network); 1 Jun 2014 19:24:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2014 19:24:02 -0000 Authentication-Results: pb1.pair.com header.from=kassner@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kassner@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: kassner@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wg0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:57642] helo=mail-wg0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/63-15017-0DD7B835 for ; Sun, 01 Jun 2014 15:24:01 -0400 Received: by mail-wg0-f43.google.com with SMTP id l18so4199800wgh.14 for ; Sun, 01 Jun 2014 12:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=w4ou24vd7MlhS0sI7KKc1/bo7BY90F0dAYTMXi6Z14w=; b=kS1pyMCan3HSFAQbYZgQyrMwtVK/zlUW0/qv0YwT5ZoUjOVQxYa+TX8uZmYNgt8JTu UPVkB4bfTOdRaHRmkrbg0d37gXJF/oJwyTZegb2rsbA8vN0S38UcZoa24UZJUqnqfP5H W5VMPRiSrAsAAdTO/9z8o3Fc7H57g6BjUBM2SC5rzEZXChJmsGRgwl+YaZF02CfgJ77a sa41hcf59jNv12yjClRq/M6c0o0J9v6206xbnx+ePKMp27UODwOnaDjg9uO+wFffp6Wc 6DHeE+8tZavnongDGbEFFFex4g2sFyZqsZS9dNlm4HSuFxRu3MurzKaJsnYFBxSMZGOv 9P5w== X-Received: by 10.180.211.36 with SMTP id mz4mr16552314wic.20.1401650638091; Sun, 01 Jun 2014 12:23:58 -0700 (PDT) MIME-Version: 1.0 Sender: kassner@gmail.com Received: by 10.194.2.47 with HTTP; Sun, 1 Jun 2014 12:23:37 -0700 (PDT) In-Reply-To: <0CF7DFF1-106F-4485-A371-EF52DA624798@ajf.me> References: <6E3D6B3F-1BD6-42A2-B59C-12B9D6D597ED@ajf.me> <538B6D49.3030402@sugarcrm.com> <2F19394F-C75C-40E8-94C3-507FAA9ADE28@ajf.me> <71878B94-F83E-4787-BC5C-75F43FB00911@ajf.me> <0CF7DFF1-106F-4485-A371-EF52DA624798@ajf.me> Date: Sun, 1 Jun 2014 16:23:37 -0300 X-Google-Sender-Auth: obr4kfkBgwP-B4n9066aMfuL_zo Message-ID: To: Andrea Faulds Cc: Stas Malyshev , PHP internals Content-Type: multipart/alternative; boundary=001a11c335ce61fe6b04facb3827 Subject: Re: [PHP-DEV] [RFC] Bare Name Array From: kassner@php.net (Rafael Kassner) --001a11c335ce61fe6b04facb3827 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry, I didn't realize that this would not change the current behaviour. Should be possible to mix both declarations? define('FOO', 'bar'); > $data =3D array(FOO =3D> 'bar', FOO :> 'baz'); On Sun, Jun 1, 2014 at 4:09 PM, Andrea Faulds wrote: > > On 1 Jun 2014, at 19:56, Rafael Kassner wrote: > > > You missed my point, I'm not saying about undefined constants, I'm sayi= ng > > about the usage of defined constants as array keys. If the array > > declaration don't expand constants to strings anymore, many code will > > break. > > I haven=E2=80=99t changed that. =3D> still works the same as ever. I=E2= =80=99m adding a > colon syntax which takes a bare name instead of an expression. > > > If we expand constants within array declaration, someone can mess up > > the code by adding a define() somewhere above and don't even realize > what's > > wrong (constants have global scope). > > But that=E2=80=99s how it works at present. People writing array(foo =3D>= 3) and > assuming that=E2=80=99s the same as array(=E2=80=98foo=E2=80=99 =3D> 3) n= eed to try turning > display_errors on. > -- > Andrea Faulds > http://ajf.me/ > > > > > --001a11c335ce61fe6b04facb3827--