Re: quick question about using capital letters coding w/ PHP

From: Date: Mon, 25 Jul 2005 12:27:39 +0000
Subject: Re: quick question about using capital letters coding w/ PHP
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-219298@lists.php.net to get a copy of this message
Richard Lynch wrote:
On Sun, July 24, 2005 11:39 am, Dotan Cohen said:
On 7/24/05, Bruce Gilbert <webguync@gmail.com> wrote:
I am well versed in coding with xhtml which requires all lower case and am pretty much a newbie at PHP so that is why I am asking this question. is this acceptible if ($_post [sender_email] == "") or does at have to be if ($_POST [sender_email] == "") in short, do uppercase and lowercase always have the same meaning. thx,
PHP is case-sensitive. UppERCase is NOT the same as uppercase. HTML is not case sensitive only because browsers are forgiving.
PHP variables are case-sensitive. PHP FUNCTIONS are not. You're on your own figuring out if class names/methods are/aren't case-sensitive this week. :-v
1. classname are case-insensitive (at least in all the builds I have running) but since 5.0.1 (IIRC) the engine honors your case when using get_class(), in the past the class name was always returned lowercase. so: php -r 'class Test {} $t = new Test; if ($t instanceof test) { echo "yeah!\n"; } echo get_class($t),"\n";' will echo: yeah! Test 2. methodnames are the same as functionname with regard to case-sensitivity 3. constants (and class constants) are case sensitive. ...somebody beat me with a virtual stick if I am wrong!


« previous php.general (#219298) next »