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 default session time in php?
What is a php trait?
What are the advantages of indexes?
How do http requests work?
What is regular expression in php?
Tell me what is the difference between the functions strstr() and stristr()?
Tell me can you extend a final defined class?
What is use of isset function in php?
Is php a low level language?
Explain NULL?
Is php case sensitive?
What is the difference between exception::getmessage and exception::getline?
What is return in php function?
What is the difference between characters 34 and x34?
Why is php so popular?