You are here: Re: Capitalization and Classes « PHP Programming Language « IT news, forums, messages
Re: Capitalization and Classes

Posted by Michael Fesser on 11/06/07 19:43

..oO(Good Man)

>I'm learnin' myself some OO programming (finally), and was wondering if
>someone could briefly tell me why when setting up my object...
>
>$p = new Person();
>
>... that the following both print "Bob" to the screen:
>
>print $p->name;
>print $p->Name;
>
>
>The method in the class is getName, so why would "name" (lowercase) work
>here? All my experience in PHP says that uppercase/lowercase is vitally
>important!

Variable names are case-sensitive, method names are not.

Micha

 

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

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