Why does some code in PHP have to be written in uppercase?
For instance:
if(isSet($_GET['lang']))
$lang = $_GET['lang'];
$_SESSION['lang'] = $lang;
Do they work if I write them in lowercase?
Why does some code in PHP have to be written in uppercase?
For instance:
if(isSet($_GET['lang']))
$lang = $_GET['lang'];
$_SESSION['lang'] = $lang;
Do they work if I write them in lowercase?
If you refer to the function names: Yes, those are case insensitive. You can use IsSET()
, IsSeT()
, isSET()
to your heart's content.
If you refer to the variables $_GET
etc.:
No, variable names in PHP are case sensitive:
Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive.
Variable names are case-sensitive.
Some you mention have to be written uppercase by convention, the superglobal arrays like _GET, _SESSION et al.