Closed YuanchengJiang closed 1 month ago
The following code:
<?php class C { public int $a = 1; } function test(string $name, object $obj) { var_dump($obj); } $reflector = new ReflectionClass(C::class); $obj = $reflector->newLazyGhost(function ($obj) { throw new Error("initializer"); }); test('Proxy', $obj); json_encode($obj, 0, 540);
Resulted in this output:
/php-src/Zend/zend_lazy_objects.c:627: HashTable *zend_lazy_object_get_properties(zend_object *): Assertion `!object->properties || object->properties == &zend_empty_array' failed. Aborted (core dumped)
PHP 8.4.0-dev
ubuntu 22.04
cc @arnaud-lb, @nicolas-grekas
Thank you @YuanchengJiang
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04