Re: PHP Classes For Beginners Using destructors PHP Code: class Box
{
var width;
var height;
function ~box()
{
//Code for release the memory
}
}
Box1=new box (); //it’s call the constructor function
Delete box1; //it’s call destructor function
__________________ Thanks & Regards, Jegan CBK "We will either find a way, or make one!” |