In PHP, an interface is defined using the interface keyword.

  • TRUE
  • FALSE
  • nan
  • nan
In PHP, an interface is indeed defined using the interface keyword. This keyword is placed before the name of the interface and is used to declare the interface. An interface consists of method signatures without implementation and can also define constants. Interfaces establish a contract that classes must adhere to when implementing the interface. Classes that implement an interface must provide an implementation for all the methods defined in the interface. The interface keyword is crucial for properly defining an interface in PHP. For more details, refer to: http://php.net/manual/en/language.oop5.interfaces.php
Add your answer
Loading...

Leave a comment

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