Why do we use polymorphism in php?
Answer / Gaurav Kumar Sinha
Polymorphism in PHP allows objects of different classes to be treated as objects of a common super class, providing a powerful mechanism for code reuse and abstraction. It enables methods to perform differently based on the object's class, making the code more flexible and easy to maintain.
| Is This Answer Correct ? | 0 Yes | 0 No |
Tell me how do you execute a php script from the command line?
Is php used in 2019?
Tell me how to initiate a session in php?
What is php? Why it is used?
What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
How do you call a constructor for a parent class?
How do you access a get requests url parameter with php?
What is final keyword in php?
What are the special characters you need to escape in double-quoted stings?
Describe the security vulnerability of PHP?
What does php do?
Explain me what is the goto statement useful for?