Re: Re: [RFC][DISCUSSION] Change var_export() array syntax to use shorthand arrays

From: Date: Mon, 30 Mar 2020 02:40:54 +0000
Subject: Re: Re: [RFC][DISCUSSION] Change var_export() array syntax to use shorthand arrays
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-109443@lists.php.net to get a copy of this message
Hey Andrea, Thanks for that. Good catch on the stdClass and __set_state parts. I neglected those in RFC, but I will add them. But they are still all forwards compatible changes so no major impact. On Sun, Mar 29, 2020 at 6:42 PM Andrea Faulds <ajf@ajf.me> wrote: > Hi again, > > Andrea Faulds wrote: > > Hi Sherif, > > > > Sherif Ramadan wrote: > >> I'm proposing a new RFC to change var_export()'s array syntax to use the > >> short hand array syntax instead. > >> > >> The RFC is available here > >> https://wiki.php.net/rfc/var-export-array-syntax > >> > >> This is a forwards-compatible change proposed for and targeting PHP 8.0. > >> > >> I'd like to open up discussion. > >> > > > > What about stdClass? That is currently exported using an object cast > > applied to an array literal, and that array literal uses long array > > syntax for consistency. I think this should be mentioned in the RFC, > > whatever choice you make. > > Oops, I forgot about classes with ::__set_state! (I only thought about > stdClass because it was me that added support for it, unlike for > __set_state.) That also uses the old array syntax. > > Thanks and sorry for spam, > Andrea > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#109443) next »