Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-09 Thread Sherif Ramadan
> > > I have no strong opinion > either way, but anyway it cannot work as is, because var_export > already has a second optional parameter (bool $return = false). > Yes, I meant the third argument. I updated the RFC to reflect that. Sorry. > Moreover the RFC currently says that

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Sherif Ramadan
On Wed, Apr 8, 2020 at 9:37 AM Derick Rethans wrote: > > It's different. Changing from long to short array syntax makes it > unparsable by older versions of PHP. > All versions of PHP which don't support short array syntax have long been EOL for nearly 5 years now. We can't possibly be expected

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Guilliam Xavier
On Wed, Apr 8, 2020 at 3:12 PM Sherif Ramadan wrote: > > So to recap on what's been discussed so far, because I plan to bring this > to a vote next week... > > I am updating the RFC to reflect that the change will no longer break > backwards compatibility. I will be adding an flags argument with

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Paul M. Jones
> On Apr 8, 2020, at 08:37, Derick Rethans wrote: > > I still believe that none of these options are needed. var_export() has > been added to generate PHP parser readable code. I think it was said earlier, but I'll say it again: having it generate parser-readable code is great, but having

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Derick Rethans
On Wed, 8 Apr 2020, Sherif Ramadan wrote: > On Wed, Apr 8, 2020 at 9:22 AM Benjamin Morel > 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

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Sherif Ramadan
On Wed, Apr 8, 2020 at 9:22 AM Benjamin Morel 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

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Benjamin Morel
> 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! - Ben

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-08 Thread Sherif Ramadan
So to recap on what's been discussed so far, because I plan to bring this to a vote next week... I am updating the RFC to reflect that the change will no longer break backwards compatibility. I will be adding an flags argument with the following 3 optional bitwise flags for var_export: -

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-03 Thread Sherif Ramadan
On Fri, Apr 3, 2020 at 5:16 PM Andrea Faulds wrote: > Hey Sara, > > Sara Golemon wrote: > > On Mon, Mar 30, 2020 at 12:38 PM Chase Peeler > wrote: > > > >> Just out of curiosity, is there any reason we couldn't add an optional > >> parameter called "$short_array" or whatever that defaults to

Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax touse short hand arrays

2020-04-03 Thread Andrea Faulds
Hey Sara, Sara Golemon wrote: On Mon, Mar 30, 2020 at 12:38 PM Chase Peeler wrote: Just out of curiosity, is there any reason we couldn't add an optional parameter called "$short_array" or whatever that defaults to false? Then there shouldn't be any backwards compatibility issues. None at