Category
language · php-src-strict · AOT silent wrong output
Problem
Closure::call() with a bound $this returns the private property on Zend/VM/JIT, but the AOT binary builds successfully and prints nothing (characteristic silent wrong-output / empty-echo defect).
| Repro |
Zend 8.2+ |
VM/JIT (2026-08-02) |
AOT (2026-08-02) |
$f->call(new A()) with private $x=5 |
5 |
5 |
empty (exit 0) |
php-src reference
PHP implementation target
lib/JIT/ Closure call / bound-object lowering + lib/ runtime helpers as needed — reuse VM semantics for call; no new C runtime branches
Repro
./script/docker-exec.sh -- bash -lc '
php test/repro/maintainer_gap_aot_closure_call.php
php bin/vm.php test/repro/maintainer_gap_aot_closure_call.php
php bin/jit.php test/repro/maintainer_gap_aot_closure_call.php
php bin/compile.php -o /tmp/ccall test/repro/maintainer_gap_aot_closure_call.php && /tmp/ccall
'
<?php
class A { private $x = 5; }
$f = function () { return $this->x; };
echo $f->call(new A()), "\n";
Done when
Category
language· php-src-strict · AOT silent wrong outputProblem
Closure::call()with a bound$thisreturns the private property on Zend/VM/JIT, but the AOT binary builds successfully and prints nothing (characteristic silent wrong-output / empty-echo defect).$f->call(new A())with private$x=555php-src reference
Zend/zend_closures.c—ZEND_METHOD(Closure, call)Zend/zend_closures.stub.php—callPHP implementation target
lib/JIT/Closure call / bound-object lowering +lib/runtime helpers as needed — reuse VM semantics forcall; no new C runtime branchesRepro
Done when
5matching Zend/VM/JIT--repeat/ multi-run if heap corruption suspected