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!” |