FYK (updated)
Case sensitive (both user-defined and PHP defined)
- variables
- constants ->>check Amendment 1
- array keys
- class properties
- class constants
Case insensitive (both user defined and PHP defined)
- functions
- class constructors
- class methods
- keywords and constructs (if, else, null, foreach, echo etc.)
In php.net
Basics
Variables in PHP are represented by a dollar sign followed by the variable’s name. The variable name is case-sensitive.
Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscores, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
Amendments
- Class constants are always case-sensitive. Global constants declared with const are always case-sensitive. It should be noted that this applies only to the shortname of the constant, while namespaces in PHP are always case-insensitive. Constants declared with define() are case-sensitive by default
Some useful Links
- Userland Naming Guide
- Why are functions and methods in PHP case-insensitive?
- Are PHP functions case sensitive?
- Are PHP keywords case-sensitive?
- Are PHP function names case-sensitive or not?
- Source of PHP Case Sensitive