Yes, functions and methods names are not case-sensitive.
And yes, variables names are case-sensitive.
I am not sure there's a reason for that -- except it's been this way for a long time, and, so, remains the case, for backward compatibility reasons.
As a reference, a couple of links / quotes to various pages of the manual:
For functions (quoting):
Note: Function names are
case-insensitive, though it is usually
good form to call functions as they
appear in their declaration.
And methods are not much more than functions in objects -- especially when we think about PHP 4 and backward-compatibility.
And, for variables ([quoting][2]):
Variables in PHP are represented by a
dollar sign followed by the name of
the variable. The variable name is
case-sensitive.
And object properties are not much more than variables in objects -- same remark about PHP 4 and backward-compatibility.
class Share{ share($str){ echo $str; } } $sh = new Share(); $sh->share("string");
You may be surprised to see two calls to function share($str). first one because of c'tor and second explicit call for same reasons!! – Hadfield