What is the purpose of destructor ?

Answers were Sorted based on User's Feedback



What is the purpose of destructor ?..

Answer / sloog

Because destructors are are called when objects are
destroyed, they can be used for flushing a resource or
logging information on object destruction.

Is This Answer Correct ?    10 Yes 1 No

What is the purpose of destructor ?..

Answer / sunil kumar

A destructor is used to destroy the objects that have been
created earlier.Destructor is a member function whose name
is the same as the class name but is preceded by tilde sign.
It never takes any argument nor it returns any value.It`ll
be invoked implicitly by the compiler upon exit from the
program to clean up storage that is no longer accessible.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More PHP Interview Questions

What are the advantages of PHP over HTML?

11 Answers   Infosys, Torque Infotech,


why we use @symbol before the variable

5 Answers   HCL, Numark,


what is interface in java.

4 Answers  


What language is php written in?

0 Answers  


How to get the total number of values in an array?

0 Answers  






How to convert numbers to strings in php?

0 Answers  


How do I find out the number of parameters passed into function?

1 Answers  


Explain mail function in PHP with syntax?

0 Answers  


Which function is used to read a file removing the html and php tags in it upwork?

0 Answers  


What is mysqli php?

0 Answers  


What is global array in php?

0 Answers  


Tell me is it possible to remove the html tags from data?

0 Answers  


Categories