Skip to content

Infinite recursion through deprecated class constants self-referencing through deprecation message #17711

Description

@iluuu1994

Description

The following code:

<?php

const TEST = 'Message';

class C {
    #[\Deprecated(self::C)]
    const C = TEST;
}

var_dump(C::C);

Resulted in this output:

Segfault

But I expected this output instead:

Deprecated constant C::C
string(7) "Message"

PHP Version

PHP 8.4

Operating System

No response

Activity

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions