emacs-php / emacs-php/php-mode

Incorrect highlighting of superglobals and predefined constants

Open
#75 3 comments 0 reactions 1 assignee Claimed by @ejmr View on GitHub
Bug
Dominant language
Emacs Lisp
Stars
602
Forks
117
Avg merge
12h 54m
Merged PRs (30d)
3

Description

ATM, php-mode treats all constants and superglobals as case-insensitive, i.e. `$_server` or `pHp_VeRsIon` are highlighted as if the were correct, but PHP will only throw errors if you run this.

From what I've gathered from the PHP documentation, only [the eight magic constants](http://php.net/manual/en/language.constants.predefined.php) are case-insensitive. All [superglobals](http://www.php.net/manual/en/language.variables.superglobals.php) and [predefined constants](http://www.php.net/manual/en/reserved.constants.php) and the ones from [core extensions](http://www.php.net/manual/en/extensions.membership.php#extensions.membership.core) are case-sensitive, and should only be highlighted if they are all caps

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.