You need to use inheritance in your PHP script. How would you do this?

  • By using the extends keyword
  • By using the implement keyword
  • By using the inherit keyword
  • By using the derive keyword
In PHP, to use inheritance in your script, you would use the extends keyword followed by the name of the parent class. The correct option is "By using the extends keyword." By extending a class, you create a subclass that inherits properties and methods from the parent class. For further details, refer to the PHP documentation on class inheritance: http://php.net/manual/en/language.oop5.inheritance.php
Add your answer
Loading...

Leave a comment

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