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 long is session timeout?

0 Answers  


Define about declare construct?

0 Answers  


What are the ways to include file in php?

0 Answers  


Specify pre-defined classes in php ?

1 Answers  


Is php an oop?

0 Answers  






Explain the difference between session and cookies in php?

0 Answers  


When to use get and post request?

0 Answers  


What is the difference between fopen() and fclose()?

0 Answers  


what use of <?php

1 Answers   CBS,


What is the PHP predefined variable that tells the What types of images that PHP supports?

1 Answers  


How many types of inheritances used in php and how we achieve it.

0 Answers  


How is it possible to parse a configuration file?

0 Answers  


Categories