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 is warning – “cannot modify header information – headers already sent”?
How to list all values of submitted fields?
Is php is dying?
What is the difference between indexed and associative array?
What is the difference between super () and this ()?
Which is correct about mysqli and pdo?
What is the role of the .htaccess file in php?
Why use php artisan serve?
What is Apache's configuration file typically called?
How to create a public static method in PHP?
How can you send email in php?
Is null function in php?
Which will start a session?
What does explode do in php?
What is the difference between nowdoc and heredoc?