You are here: Re: [PHP] quick question about using capital letters coding w/ PHP « PHP « IT news, forums, messages
Re: [PHP] quick question about using capital letters coding w/ PHP

Posted by Jochem Maas on 07/25/05 15:27

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!

>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация