Skip to content

Volatile arguments in frameless calls #21639

Open

Description

@iluuu1994

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

Activity

  1. self-assigned this
    on Apr 4, 2026
  2. khaledalam commented on Apr 19, 2026

    @khaledalam
    Contributor

    Hi @iluuu1994 I can't reproduce this https://3v4l.org/DAvOV#vnull

  3. iluuu1994 commented on Apr 19, 2026

    @iluuu1994
    MemberAuthor

    You might need asan to get a crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions