RE: [PHP] Question on class syntax

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-07-2003
Luis Lebron
 
Posts: n/a
Default RE: [PHP] Question on class syntax

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...

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0