|
Posted by Good Man on 11/06/07 19:44
Michael Fesser <netizen@gmx.de> wrote in
news:0tg1j3d60a4ut617q8c0g87fjnqsta9hmb@4ax.com:
> .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.
Many thanks.
Navigation:
[Reply to this message]
|