Category
stdlib · php-src-strict
Problem
Closure::getCurrent() is a PHP 8.4+ API. Implementation landed in #13981, but on the reference profile (host PHP 8.2) method_exists(Closure::class, 'getCurrent') must be false like Zend. VM reports true, a phantom method registration breaking capability probes and function_exists-style library gates.
Forward-line builds advertising PHP 8.4 may expose the method when CompilerVersion::supportsClosureGetCurrent() is true and host PHP version matches — not unconditionally on 8.2 reference.
php-src reference
PHP implementation target
lib/VM/BuiltinClasses.php / ClosureState registration gated by CompilerVersion::supportsClosureGetCurrent() + host reference parity — no new C in runtime/
Repro
test/repro/maintainer_gap_closure_get_current_phantom.php
./script/docker-exec.sh -- php test/repro/maintainer_gap_closure_get_current_phantom.php
./script/docker-exec.sh -- php bin/vm.php test/repro/maintainer_gap_closure_get_current_phantom.php
| Probe (host PHP 8.2) |
Zend |
VM |
method_exists(Closure::class, 'getCurrent') |
false |
true |
Functional repro when enabled: test/repro/maintainer_gap_closure_get_current.php.
Done when (php-src-strict)
Category
stdlib· php-src-strictProblem
Closure::getCurrent()is a PHP 8.4+ API. Implementation landed in #13981, but on the reference profile (host PHP 8.2)method_exists(Closure::class, 'getCurrent')must befalselike Zend. VM reportstrue, a phantom method registration breaking capability probes andfunction_exists-style library gates.Forward-line builds advertising PHP 8.4 may expose the method when
CompilerVersion::supportsClosureGetCurrent()is true and host PHP version matches — not unconditionally on 8.2 reference.php-src reference
Zend/zend_closures.c—zim_Closure_getCurrent(PHP 8.4+)PHP implementation target
lib/VM/BuiltinClasses.php/ClosureStateregistration gated byCompilerVersion::supportsClosureGetCurrent()+ host reference parity — no new C inruntime/Repro
test/repro/maintainer_gap_closure_get_current_phantom.phpmethod_exists(Closure::class, 'getCurrent')falsetrueFunctional repro when enabled:
test/repro/maintainer_gap_closure_get_current.php.Done when (php-src-strict)
Closure::getCurrentfrommethod_exists/ class method tablegetCurrent()per Stdlib: Closure::getCurrent() missing — PHP 8.4 closure introspection (Zend/zend_closures.c) #13981test/repro/maintainer_gap_closure_get_current_phantom.phpgreen on VM against 8.2 reference