Tell me what are the __construct() and __destruct() methods in a php class?
Answer / Shivani Sharma
__construct() is a special method that gets called when an object is instantiated. It's used for initializing the properties of a new object. On the other hand, __destruct() is called when the object is about to be destroyed or when the script finishes execution. It's used for cleaning up resources that the object may have acquired during its lifetime.
| Is This Answer Correct ? | 0 Yes | 0 No |
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
What is an array in php?
What is $row in php?
What do you mean by having php as whitespace insensitive?
What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
Tools used for drawing er diagrams?
What is abstract class in php?
Explain what are psrs?
What is http get and post?
Why super () is used in java?
What is php limit?
What is the difference between php and java?