-
Meta
Categories
Tag Cloud
Apache class class autoloading eregi_replace ereg_replace Exceptions https Implicit Inner Join join Load balancing microsoft msword MySQL object oop Perl PHP php.ini PHP 5 Session SOAP Implementation sqlite ssl xml
Recent Comments
- Macs Rvsp:We can encrypt password in php
- Saravanan:copy the content of word docum
- Shubha:We can not control this from p
- sandeep:can we do it through php
- KISHORE:yes
- Moni:Can anybody Please explain, ho
- nazia:$str = ereg_replace(’four’, $n
- hemant:super question..& answer.
- hemant:$nm = '4'; $str = "This strin
- hemant:SELECT * FROM employee INNER
Recent Post
- What is a Session?
- An easy way to remove all the hyperlinks from an word document.
- 5 steps to create a self-signed SSL Certificate
- Install Apache, MySQL, PHP and Perl in one shot using xampp.
- What is the difference between inner join and outer join?
- What is the query to get the number of “names” from a table that is occuring more than 10 times.
- Describe the lifecycle of object creation.
- How do you maintain session in a load balancing system?
- Which will be faster out of queries with explicit INNER JOIN and implicit one?
- What is the difference between ereg_replace and eregi_replace?
2 Responses to “Describe the lifecycle of object creation.”
By Shyambabu on Feb 2, 2009 | Reply
first we have to create a class with parameters or with out parameters and with some funtions.
like class Test{
$no;
$name;
function Exampleclass(){
$no=0;
$name=NULL;
}
function setNo($num)
{
$no=$num;
}
function setName($uname)
{
$name=$uname;
}
function getNo(){
return $this->no;
}
function getName(){
return $this->name;
}
}
class TestExample{
$testexample= new Exampleclass();
$testexample->setNo(1);
$testexample->setName(’aa’);
$testexample->getNo();
$testexample->getName();
}
By hemant on Feb 28, 2009 | Reply
The Object $testexample is still live untill the script is running or if you forcefully destroy with using the unset() function. If you use the constructor & deconstructor than it is automation the destroy at the end of the script.
One More think if you have two deconstructor for parient & child class than only the child’s class deconstructor is execute automatic. for calling the parent you must call them like.. parent::__deconstructor();