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
Language: first-class callable on (new Class())->method(...) — TypeReconstructor compile crash #6725
First-class callable syntax on a temporary instance(new Box())->add(...) must compile and run like Zend. #4957 / #6024 fixed $obj->method(...) on a named variable, but the inline new receiver still crashes during type reconstruction.
Runtime
(new Box())->add(...) then $f(1,2)
Zend PHP 8.2+
prints 3
bin/vm.php
Uncaught TypeError in PHPTypes\TypeReconstructor.php:303 (exit 255)
The compile crash was already fixed on master (#4957 — TypeReconstructorExpr_FirstClassCallable returns new Type(Type::TYPE_ARRAY) for method kind; compileFirstClassCallable lowers instance FCC via TYPE_INIT_ARRAY + TYPE_FROM_CALLABLE).
Activity
PurHur commentedon Jun 6, 2026
claim: worker-lane-c — starting this run
PurHur commentedon Jun 6, 2026
Merged via #6729.
The compile crash was already fixed on master (#4957 —
TypeReconstructorExpr_FirstClassCallablereturnsnew Type(Type::TYPE_ARRAY)for method kind;compileFirstClassCallablelowers instance FCC viaTYPE_INIT_ARRAY+TYPE_FROM_CALLABLE).This PR adds the missing compliance guard:
test/compliance/cases/language/fcc_new_instance.phpttest/fixtures/aot/cases/fcc_new_instance.phptVerification: