What is the purpose of destructor ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of PHP arrays?

565


How to convert a json string to an array in php?

555


Write a program to swap two numbers using php.

538


Explain the advantages of using PHP?

549


How do you find the length of a string in php?

512






Explain me what is the use of 'print' in php?

526


What is the most convenient hashing method to be used to hash passwords?

503


What is memcache?

540


How does php and apache work?

530


Can we extend multiple classes in php?

538


What is the main difference between require() and include()?

476


How we get ip address of client, previous reference page etc?

562


What is the use of magic function in php?

504


Inside a php function, what param needs to be set in order to access a global variable?

537


Tell me what is the meaning of a final class and a final method?

523