Skip to content

"class die {}" shows invalid error message #17495

@ohyeaah

Description

@ohyeaah

Description

The following code:

<?php class die {}

Resulted in this output:

Parse error: syntax error, unexpected token "exit", expecting identifier in /in/84ai5 on line 1

But I expected this output instead:

Parse error: syntax error, unexpected token "die", expecting identifier in /in/84ai5 on line 1

PHP Version

PHP 8.4.3

Operating System

3v4l

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions