PHP case sensitivity

Top

I’ve always found the case sensitivity rules in PHP a little mysterious, and also a little hard to find definitive information on. So, for reference sake here they are. Tests based on PHP 5.3 running on Wamp Server:

Case sensitive (both user defined and PHP defined)

  • variables
  • constants
  • 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.)

Share this page...

Twitter icon
Facebook icon
Google icon
StumbleUpon icon
Del.icio.us icon
Digg icon
LinkedIn icon
MySpace icon
Newsvine icon
Pinterest icon
Reddit icon
Technorati icon
Yahoo! icon
e-mail icon