Skip to content

Prevent offsetGet on enums in const expr #58

Description

@iluuu1994

Based on this discussion. We need to prevent Foo::Bar[0] in const expressions because that would allow you to run arbitrary code in a constant expression (through offsetGet). This should probably be mentioned in the RFC.

Here's the tests, maybe that will make more sense:
iluuu1994/php-src@4f4c314

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions