This is a discussion on RE: [PHP] Question on class syntax within the PHP General forums, part of the PHP Programming Forums category; Thanks for the information. I checked the manual but wasn't able to find it. Luis -----Original Message----- From: CPT ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Thanks for the information. I checked the manual but wasn't able to find it.
Luis -----Original Message----- From: CPT John W. Holmes [mailto:holmes072000@charter.net] Sent: Thursday, August 07, 2003 1:35 PM To: Luis Lebron; Php-General (E-mail) Subject: Re: [php] Question on class syntax From: "Luis Lebron" <llebron@sigmatech.com> > 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 could also have: $ob = new htmlcleaner; $value = $ob->cleanup($value); You can use the first method without having to actually make a new object. Whether that's better or not depends upon your application. It basically turns your "object" into a function repository. ---John Holmes... |