[thelist] OO PHP call a method on class when instantiated

Dan Romanchik dan at danromanchik.com
Wed Jun 15 05:36:14 CDT 2005

These are called constructors.  Read


for an explanation of how they work.

Good luck!

Dan Romanchik, Web Developer & Blogger
734-930-6564, dan at danromanchik.com
Read my ham radio blog at http://www.kb6nu.com

Simon Perry wrote:
> Hi,
> I would like to call a method of my class when an instance of the class 
> is instantiated but I'm at a loss as to how to do this. I have googled 
> without joy. The method populates various vars that will always be 
> required. At the moment I create an instance and then call the method  
> but that seem inefficient. I'm sure I'm missing something very simple 
> here...
> Simon

More information about the thelist mailing list