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
Simple trait use, abstract classes, and interfaces compile on VM today:
./script/docker-exec.sh -- bash -lc 'source script/php-env.shphp bin/vm.php -r "trait T { public function f(): int { return 1; } } class C { use T; } echo (new C)->f();"php bin/vm.php -r "abstract class A { abstract public function f(): int; } class C extends A { public function f(): int { return 1; } } echo (new C)->f();"php bin/vm.php -r "interface I { public function f(): int; } class C implements I { public function f(): int { return 1; } } echo (new C)->f();"'
Category
languageProblem (May 2026 refresh)
Simple trait use, abstract classes, and interfaces compile on VM today:
All print
1on master. Remaining Zend parity:insteadof/asfails at parse (Language: TraitUseAdaptation — insteadof / as alias (Zend compile parity) #3238)implementsenforcement — missing method not fatal at compile timeinstanceofinterface — verify bool against Zend (Compiler: Class inheritance (extends) and interfaces #101 overlap)new AbstractClassmust fatalphp-src reference
Zend/zend_compile.c—zend_compile_traits, abstract flag, interface tableZend/zend_inheritance.c— trait flattening, abstract method checksZend/zend_execute.c—instanceof, interfacecechecksZend/zend_language_parser.y— trait adaptation grammar (Language: TraitUseAdaptation — insteadof / as alias (Zend compile parity) #3238)Repro — gaps
Trait adaptation (parse failure → #3238)
This compiler: parse error
T_INSTEADOFZend: prints
12Missing interface method (compile-time)
Zend: compile error
Class C contains 1 abstract methodThis compiler: verify — file issue sub-task if silent
Abstract instantiate
Zend: fatal
Cannot instantiate abstract classThis compiler: verify and match
Scope (this repo)
lib/Compiler.phpcompileClassLikelib/VM.phplib/JIT.phptest/compliance/cases/trait_use.phpt,abstract_class.phpt,interface_implements.phptDone when
use T;+ abstract + interface repros remain green on VMnew Abstract→ fatal on VM./script/ci-fast.sh --filter TraitUsegreen@group llvm(or document VM fallback)Verification
Dependencies
Links