a) extends
b) implements
c) inherit
d) include
Answer: a
Explanation: When we extend a class then the subclass will inherit all the public and protected methods from the parent class.
The keyword implements are used with interfaces. With inheritance, we use the keyword extends.
Related Posts
Which function returns an array consisting of associative key/value pairs?
What will be the output of the following PHP code?
<?php
$fruits = array (“apple”, “orange”, array (“pear”, “mango”),
“banana”);
echo (count($fruits, 1));
?>Which of the following function is used to get the value of the previous element in an array?
What will be the output of the following PHP code?
<?php
$fruits = array (“apple”, “orange”, “banana”);
echo (next($fruits));
echo (next($fruits));
?>What will be the output of the following PHP code?
<?php
$state = array (“Karnataka”, “Goa”, “Tamil Nadu”,
“Andhra Pradesh”);
echo (array_search (“Tamil Nadu”, $state) );
?>Which in-built function will add a value to the end of an array?
Which of the following PHP function will return true if a variable is an array or false if it is not an array?
Join The Discussion