__contructors

Recommend this page to a friend!

      Destructor  >  All threads  >  __contructors  >  (Un) Subscribe thread alerts  
Subject:__contructors
Summary:is there no way to implement in php 4?
Messages:3
Author:Oliver Lillie
Date:2005-11-08 09:39:02
Update:2005-11-08 17:15:34
 

  1. __contructors   Reply   Report abuse  
Oliver Lillie - 2005-11-08 09:39:02
Is there no way to implement contructor like functions in php 4?

  2. Re: __contructors   Reply   Report abuse  
Bryan Smith - 2005-11-08 16:16:54 - In reply to message 1 from Oliver Lillie
Yes there is! Constructors can be called in php4 by creating a function with the exact name of the class.

ex:

class MyNewClass
{
// This is the constructor
function MyNewClass
{
// Do Stuff
}
}

  3. Re: __contructors   Reply   Report abuse  
Oliver Lillie - 2005-11-08 17:15:34 - In reply to message 2 from Bryan Smith
ah yes i know that.... doh!

 

For more information send a message to info at phpclasses dot org.