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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
On Sun, July 24, 2005 11:39 am, Dotan Cohen said:

On 7/24/05, Bruce Gilbert <webguync@xxxxxxxxx> 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!



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux