[php-src] Issue #10066: var_export on anonymous classes
| From: | KapitanOczywisty | Date: | Wed, 07 Dec 2022 17:37:35 +0000 |
| Subject: | [php-src] Issue #10066: var_export on anonymous classes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243067@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10066
Author: KapitanOczywisty
### Description
I couldn't find that reported, so I'll open a new issue.
The following code:
```php
<?php
var_export(new class{});
```
Resulted in this output: https://3v4l.org/CQ6qK
```
\class@anonymous/in/CQ6qK:3$0::__set_state(array(
))
```
But I expected this output instead:
```
NULL
```
or
```
new class {}
```
### PHP Version
PHP 8.2 and older
### Operating System
_No response_