Re: [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays
| From: | Derick Rethans | Date: | Wed, 08 Apr 2020 13:37:50 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109567@lists.php.net to get a copy of this message | ||
On Wed, 8 Apr 2020, Sherif Ramadan wrote:
> On Wed, Apr 8, 2020 at 9:22 AM Benjamin Morel <benjamin.morel@gmail.com>
> wrote:
>
> > > VAR_EXPORT_NO_INDEX
> >
> > Note that I wouldn't consider a BC break to change var_export()'s
> > behaviour to always discard indexes when they're numeric, I'm not
> > sure this should even be an option!
> >
> >
> Well, it might if people are testing the output of var_export(), like in
> the phpt tests. I wouldn't have considered the short array syntax a BC
> break either if it weren't for that little pot hole.
It's different. Changing from long to short array syntax makes it
unparsable by older versions of PHP.
I still believe that none of these options are needed. var_export() has
been added to generate PHP parser readable code. And these options are
extra complexity adds no new functionality.
cheers,
Derick
--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug