Christoph M. Becker wrote:
On 14.03.2017 at 19:57, Andrea Faulds wrote:
Since stdClass has no __set_state method, var_export() produces unusable
output if given an object of that class. I wrote a patch that would make
var_export() produce a cast to object instead, which could be evaluated
to get back a stdClass:
https://github.com/php/php-src/pull/2420
Any thoughts/comments?
If you're wondering about whether a __set_state method should be added
to stdClass, I posted some thoughts in the pull request discussion already.
FTR: If nobody objects, I'll merge this PR into master on 2018-07-12, so
that it goes into PHP 7.3.
See <https://github.com/php/php-src/pull/2420#issuecomment-402561913>.
And so it was done:
https://github.com/php/php-src/commit/e4e9cd835550990a6b8df7c61d59b6cc0da9b5b2
Thanks, Cristoph! :)
--
Andrea Faulds
https://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php