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 <a...@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
>
>

Reply via email to