Re: what is ::?

From: Date: Wed, 07 Feb 2001 14:10:11 +0000
Subject: Re: what is ::?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38579@lists.php.net to get a copy of this message
It calls a class method statically, although its exact behavior depends on the scope from which it was called. If called from outside a class, then the method has no instanciated object, it's just a function. This is also how you can use work with inheritance in PHP. If you have an instanciated subclass, you can use parent::blah() to call the inherited (and overridden) methods. On Wed, 7 Feb 2001, Chien-pin Wang wrote: > > Dear all, > > Pardon me if this is explained somewhere in the > documentation. I've found the :: notation (double colons) in class > definitions of PHP's ~/lib/php directory, such as DB.php. It looks like > doing the same thing as -> notation. Can someone help to explain this a > little bit or provide links to the explaination? Thanks a lot! > > Chien-pin > > > -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD

« previous php.general (#38579) next »