[php-src] Issue #21639: Volatile arguments in frameless calls
| From: | iluuu1994 | Date: | Sat, 04 Apr 2026 21:31:49 +0000 |
| Subject: | [php-src] Issue #21639: Volatile arguments in frameless calls | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251900@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/21639
Author: iluuu1994
### Description
```php
<?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
```plain
PHP 8.4+
```
### Operating System
_No response_