Volatile arguments in frameless calls
Open
@iluuu1994 is already working on this.
Since Apr 4, 2026.
Bug
Category: Engine
Status: Verified
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
<?php
class C {
public function __toString(): string {
global $arr;
$arr = null;
return "C";
}
}
$arr = [new C, 42];
implode(", ", $arr);
Resulted in this output:
Segfault
But I expected this output instead:
Originally reported by @cnwangjihe.
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.