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
Closed #8902 required ?? on hooked properties to check backing initialization without calling the get hook. VM regressed (2026-06-16): $c->x ?? 'default' invokes a throwing get hook even when separate backing holds 'a'.
<?phpclass C {
publicstring$x {
get { thrownewException('get must not run for ??'); }
set => $this->backing = $value;
}
privatestring$backing = 'a';
}
$c = newC();
var_dump($c->x ?? 'default');
echo"ok\n";
Category
language· regression · php-src-strictProblem
Closed #8902 required
??on hooked properties to check backing initialization without calling the get hook. VM regressed (2026-06-16):$c->x ?? 'default'invokes a throwing get hook even when separate backing holds'a'.php-src reference
Zend/zend_property_hooks.c— coalesce / isset fast pathZend/zend_compile.c—ZEND_AST_COALESCEon hooked propertiesRepro
test/repro/issue_property_hook_coalesce.php:string(1) "a"+okget must not run for ??Scope
lib/VM.php—??=/ coalesce on hooked properties (~Language: ??= on property hooks must invoke get/set hooks (zend_property_hooks.c) #6472 comment)lib/JIT/— coalesce lowering when property has hookstest/compliance/cases/language/property_hook_coalesce.phptDone when
string(1) "a"andokon VMLinks