> 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 :: ?
The manual has an entire section on this
(http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php) have you
From: "Luis Lebron" <[EMAIL PROTECTED]>
> 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 :: ?
You're calling the cleanup() method of the "htmlcleaner" class.
You coul
Thanks for the information. I checked the manual but wasn't able to find it.
Luis
-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 1:35 PM
To: Luis Lebron; Php-General (E-mail)
Subject: Re: [PHP] Question on class syntax
From:
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
4 matches
Mail list logo