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

How do you develop your own PHP extension ?

2 Answers  


How do you end a session in php?

0 Answers  


What is oops php?

0 Answers  


Differentiate between php5 and php7?

0 Answers  


Whether One-line comment begin with pound sing(#) in php?

2 Answers  






what server connected

1 Answers   Wipro,


What is the use of mvc in php?

0 Answers  


How to get the number of characters in a string?

0 Answers  


How long will it take to learn php?

0 Answers  


What is trim function in php?

0 Answers  


What is serialization in php?

0 Answers  


How do you achieve page caching in PHP?

3 Answers  


Categories