Category
language · php-src-strict
Problem (updated Jun 2026 audit)
Mostly fixed on VM for function and static-method FCC:
| Form |
VM Jun 2026 |
Zend |
strlen(...) |
Closure, invokable |
yes |
C::f(...) static |
Closure, invokable |
yes |
$obj->m(...) instance |
compile failure |
Closure — #9185 |
Default param strlen(...) |
compile error (#3803) |
allowed as constant Closure |
This issue tracks remaining FCC gaps after builtin/static fix; instance FCC is split to #9185 for worker claiming.
php-src reference
Repro (still open: default parameter FCC)
<?php
class C {
public function f(Closure $c = strlen(...)): int {
return $c('abc');
}
}
echo (new C)->f(), "\n";
php repro_fcc_default.php # Zend: 3
php bin/vm.php repro_fcc_default.php 2>&1 | head -3
# parseAndCompile: Parameter default must be a compile-time constant (#3803)
| Runtime |
Result |
| Zend |
prints 3 |
| VM |
compile failure |
Instance FCC: see #9185 ($d->m(...)).
Scope (this repo)
| Layer |
Path |
| Compiler |
lib/Compiler.php — treat FCC AST as compile-time Closure constant in parameter defaults |
| VM/JIT |
Reuse closure materialization from working strlen(...) path |
| Tests |
test/compliance/cases/language/fcc_default_parameter.phpt |
PHP-in-PHP: lib/ lowering only.
Done when (php-src-strict)
Related
Category
language· php-src-strictProblem (updated Jun 2026 audit)
Mostly fixed on VM for function and static-method FCC:
strlen(...)Closure, invokableC::f(...)staticClosure, invokable$obj->m(...)instanceClosure— #9185strlen(...)This issue tracks remaining FCC gaps after builtin/static fix; instance FCC is split to #9185 for worker claiming.
php-src reference
Zend/zend_compile.c—ZEND_AST_CALLABLE_CONVERTZend/zend_closures.c— first-class callable object creationRepro (still open: default parameter FCC)
3Instance FCC: see #9185 (
$d->m(...)).Scope (this repo)
lib/Compiler.php— treat FCC AST as compile-time Closure constant in parameter defaultsstrlen(...)pathtest/compliance/cases/language/fcc_default_parameter.phptPHP-in-PHP:
lib/lowering only.Done when (php-src-strict)
3on VM./script/ci-fast.sh --filter fcc_defaultgreenRelated
$obj->m(...)· Language: non-literal default parameter values — class/global constants and null (Zend zend_compile.c parity) #3803 compile-time constants · Epic: Self-host critical path — compiler compiles itself (M3→M5) #1492