Re: Question on class syntax

From: Date: Thu, 07 Aug 2003 18:33:16 +0000
Subject: Re: Question on class syntax
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-158710@lists.php.net to get a copy of this message
The :: operator is used to access a static class method. In other words you can use the class method without creating an instance of the class. Alternatively you could have used the following less effcient syntax: $cleaner = new htmlcleaner(); $value = $cleaner->cleanup( $value ); Cheers, Rob. On Thu, 2003-08-07 at 14:25, Luis Lebron wrote: > I am currently using a php class that uses the following syntax: > > $value= htmlcleaner::cleanup($value); > > > What exactly is the :: used for? Is there a different syntax for :: ? > > thanks, > > Luis R. Lebron > Project Manager > Sigmatech, Inc -- .---------------------------------------------. | Worlds of Carnage - http://www.wocmud.org | :---------------------------------------------: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul. | `---------------------------------------------'

« previous php.general (#158710) next »