Reply to Re: Parent Objects

Your name:

Reply:


Posted by Sanders Kaufman on 01/13/07 11:10

Michael Fesser wrote:
> .oO(Sanders Kaufman)
>
>> 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?
>
> $someObject->method()
> someClass::staticMethod()
>
> '->' requires an instance of a class, whereas '::' is used to call
> static class methods or constants without having an object. Additionally
> it's used to call inherited methods.

D'oh!
I thought I had it - but then you said something about static stuff.
And I think I'm futzed up about Object v. Class here.

So let's see if I've got it better this way:

I call my OBJECT methods with "->".
I call my CLASS methods with "::".

Ja?

[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

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