Skip to content

Forbidden keywords not forbidden as function names in PHP 7 and higher #515

@tfrommen

Description

@tfrommen

Sniff: PHPCompatibility.PHP.ForbiddenNamesAsInvokedFunctions


Hi there.

When using PHP 7 or higher, the forbidden keywords are not forbidden as function names anymore, and just work, see here.

Allowing these keywords as function names could be achieved by not providing a single version, but a starting version and and ending version (meaning, in the range (START, END] the keyword actually is forbidden as a function name).
Another way is to simply disable the whole sniff when checking for PHP 7 or higher.

I'd be happy to help to here, once we know what way to do it. 🙂

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions