Unsound SCCP for partial objects with hooks
Open
@iluuu1994 is already working on this.
Since Feb 16, 2026.
Bug
Category: Optimizer
Status: Verified
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
<?php
#[AllowDynamicProperties]
class Foo {
public $prop { get => 43; set => $value; }
}
function test() {
$obj = new Foo;
$obj->prop = 42;
return $obj->prop;
}
var_dump(test());
Resulted in this output:
int(42)
But I expected this output instead:
int(43)
PHP Version
PHP 8.4+
Operating System
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.