Burnham on Sea cinema, North Somerset, UK
The Echoplex

PHP case sensitivity

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 Mac OS X:

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.)

Tagged with:

This is…

the online home of Pete Boere, web developer in Bristol, UK.

follow moi

code.google.com/p/jelly-javascript

Flickr photostream