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
{{ message }}
Repository navigation
Stdlib: ReflectionClass::getInterfaces() missing — getInterfaceNames OK (ext/reflection/php_reflection.c) #22170
Zend's ReflectionClass::getInterfaces() returns a name => ReflectionClass map of implemented interfaces (including inherited). php-compiler exposes getInterfaceNames() / implementsInterface() but method_exists($r, 'getInterfaces') is false and calling it fatals.
Repro
Zend 8.2+ (2026-07-22)
VM (2026-07-22)
getInterfaceNames() on class C implements J {} (J extends I)
['J','I']
['J','I']
getInterfaces()
['J'=>ReflectionClass, 'I'=>ReflectionClass]
missing → Error: Call to undefined method
(string)$r / __toString
non-empty reflection dump
Error: Object of class ReflectionClass could not be converted to string
ext/standard/VmReflection.php — implement getInterfaces() by resolving getInterfaceNames() into ReflectionClass objects (same map shape as Zend); optional __toString can be a follow-up if not bundled
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r "interface I {}interface J extends I {}class C implements J {}\$r = new ReflectionClass(C::class);var_export(method_exists(\$r, \"getInterfaces\"));echo PHP_EOL;var_export(\$r->getInterfaces());"'
Compare with host php on the same snippet.
Done when
ReflectionClass::getInterfaces() returns name => ReflectionClass including parent interfaces (Zend order/keys)
Compliance .phpt under test/compliance/cases/ covering implements + interface inheritance
Activity
PurHur commentedon Jul 22, 2026
claim: PHP Compiler STD Lib Advanced — batch (issues #22144, #22170, #22171, #22166, #22167, #22169, #22173; sequential PRs)
Queued after #22144.
PurHur commentedon Jul 22, 2026
claim: PHP Compiler STD Lib Advanced — starting #22170 (after merged #22144 / PR #22186)
Stdlib: ReflectionClass::getInterfaces() name=>ReflectionClass map (#…
PurHur commentedon Jul 22, 2026
Merged #22189
ReflectionClass::getInterfaces()returns Zend-orderedname => ReflectionClass(incl. parent interfaces). Verified issue repro + compliance +north-star5-verify-fast.Next: #22171
returnsReference().