View Single Post
  #14 (permalink)  
Old 04-22-2008, 05:47 AM
jegan jegan is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Posts: 161
jegan is on a distinguished road
Default Re: PHP Classes For Beginners

Constructors
Constructors are functions in a class that are automatically called when you create a new instance of a class with new. A function becomes a constructor, when it has the same name as the class. If a class has no constructor, the constructor of the base class will be called, if it exists.

Point to remember
Constructors are just a function.
Constructor must have the name of the class.
Constructor cannot have any return types
Constructor can be called during the objects creations with new keyword.
__________________
Thanks & Regards,
Jegan CBK
"We will either find a way, or make one!”
Reply With Quote