In PHP, to ensure that a method in a child class has the same name, number, and type of arguments as a method in its parent class, you use the ________ keyword.

  • 'new'
  • 'extends'
  • 'this'
  • 'private'
In PHP, the 'extends' keyword is used to create a child class that inherits properties and methods from its parent class. It enforces method signature conformity.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *