Re: [RFC] Bare Name Array

From: Date: Sun, 01 Jun 2014 19:25:38 +0000
Subject: Re: [RFC] Bare Name Array
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-74676@lists.php.net to get a copy of this message
On 1 Jun 2014, at 20:23, Rafael Kassner <kassner@php.net> wrote: > Sorry, I didn't realize that this would not change the current behaviour. > > Should be possible to mix both declarations? > > define('FOO', 'bar'); > $data = array(FOO => 'bar', FOO :> 'baz’); That would be array(FOO => ‘bar’, FOO: ‘baz’); since :> wouldn’t be used in the literal. But yes, you could mix them. That might be a little confusing, though luckily the intended spacing makes the difference more obvious (FOO => vs FOO:) -- Andrea Faulds http://ajf.me/

« previous php.internals (#74676) next »