You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP 8.4 adds ReflectionClass::getLazyInitializers(): array — returns the list of lazy-initialization closures registered on a class (lazy ghost / hook-backed lazy properties). This compiler implements other lazy-object reflection probes (#6054, #6606, #6885) but not this method.
php-src-strict: return shape and keying must match Zend reflection.
Summary
PHP 8.4 adds
ReflectionClass::getLazyInitializers(): array— returns the list of lazy-initialization closures registered on a class (lazy ghost / hook-backed lazy properties). This compiler implements other lazy-object reflection probes (#6054, #6606, #6885) but not this method.php-src-strict: return shape and keying must match Zend reflection.
php-src reference
ext/reflection/php_reflection.c—ReflectionClass::getLazyInitializersZend/zend_lazy_objects.c— lazy initializer registryRepro
Current:
bool(false)formethod_exists(ReflectionClass::class, 'getLazyInitializers')Expected (Zend PHP 8.4+): method exists; returns array (possibly empty) of
Closureinstances for lazy initializers on the class.Implementation (PHP-in-PHP)
ReflectionClassinlib/VM/Builtin/(mirrorReflectionClassGetLazyPropertyNamespattern from Stdlib: ReflectionClass::getLazyPropertyNames() — PHP 8.4 lazy property introspection missing (ext/reflection/php_reflection.c) #6606).lib/Compiler/lazy ghost paths)..phptundertest/compliance/cases/stdlib/reflection_class_get_lazy_initializers.phpt.Done when
bool(true)and sensible array on VMruntime/Links
#6054 · #6606 · #6885 · #1492