what is constructor in a class, how it is work, how it is call?
Answer Posted / sei thu htun
Constructors are functions in a class that are automatically
called when you create a new instance of a class with new. A
function becomes a constructor, when it has the same name as
the class. If a class has no constructor, the constructor of
the base class is being called, if it exists.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What are the steps involved to run php?
Explain why would we use === instead of ==?
What is preg_match?
How to retrieve values out of an array?
How does csrf token work?
What is the difference between the functions strstr() and stristr()?
Explain me what is the w3c?
When use javascript vs php?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?
How to get ip address of a server in php?
What are the Formatting and Printing Strings available in PHP?
What is the use of count() function in php?
How do I update php?
Which php framework is in demand?
What is the function used to change the root directory in PHP?