Nunney church, 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

  • flickr.com hosted photo. Id:4080807157
  • flickr.com hosted photo. Id:4080806951
  • flickr.com hosted photo. Id:4080806813
  • flickr.com hosted photo. Id:4081567982
  • flickr.com hosted photo. Id:4080806419
  • flickr.com hosted photo. Id:4081567336
  • flickr.com hosted photo. Id:4081567174
  • flickr.com hosted photo. Id:3834802544
  • flickr.com hosted photo. Id:3834802406
  • flickr.com hosted photo. Id:3834009113