Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109440 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20032 invoked from network); 30 Mar 2020 00:16:44 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 30 Mar 2020 00:16:44 -0000 To: internals@lists.php.net References: Date: Mon, 30 Mar 2020 00:42:30 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 46.59.72.204 Subject: Re: [RFC][DISCUSSION] Change var_export() array syntax to use shorthand arrays From: ajf@ajf.me (Andrea Faulds) Message-ID: 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