Reply to Re: Parent Objects

Your name:

Reply:


Posted by Rik on 01/13/07 10:38

Sanders Kaufman wrote:
> Rik wrote:
>> Sanders Kaufman wrote:
>
>>>>> What does "::" mean?
>>>>> Is that a shortcut for "->"?
>
>>>> No, it is the Scope Resolution Operator
>>>> http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
>
>>> I read that, but I'm still a little confused.
>>> When I use a class's methods and such, I've been using "->".
>>> But it seems like this "::" is used the same way.
>>> What's the difference?
>>
>> Simplified: it's the difference between objects and classes.
>
> Two part question here:
>
> [1]
> OK - but on a more practical level, what's the difference.
> I mean -like, in my code I'll create a class.
> In that class, I'll reference it's members with "$this->member".
> Then, somewhere else I'll create an object based on the class
> and reference it's members with "$class->member".
>
> Where would I use "::"?

You wouldn't, as it are all objects, and not classes. You'd only need it if
your class extended another class and you wished to call a parents method.

http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
--
Rik Wasmus

[Back to original 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

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