a) friendly b) final c) public d) static Answer: a Explanation: PHP supports five class property scopes: ...
View QuestionThe practice of creating objects based on predefined classes is often referred to as ______________
a) class creation b) object creation c) object instantiation d) class instantiation Answer: d Explanation: In object-oriented programming, classes ...
View QuestionWhich of the following term originates from the Greek language that means “having multiple forms,” defines OOP’s ability to redefine, a class’s characteristics?
a) Abstraction b) Polymorphism c) Inheritance d) Differential Answer: b Explanation: The word polymorphism is ...
View QuestionThe practice of separating the user from the true inner workings of an application through well-known interfaces is known as _________
a) Polymorphism b) Inheritance c) Encapsulation d) Abstraction Answer: c Explanation: In object-oriented PHP encapsulation is ...
View Question
What will be the output of the following PHP code?
<?php
$array1 = array (“KA”, “LA”, “CA”, “MA”, “TA”);
$array2 = array (“KA”, “IA”, “CA”, “GA”, “TA”);
$inter = array_intersect ($array1, $array2);
print_r ($inter);
?>
What will be the output of the following PHP code? <?php $array1 ...
View Question
What will be the output of the following PHP code?
<?php
$number = array (“4”, “hello”, 2);
echo (array_sum ($number));
?>
What will be the output of the following PHP code? <?php $number ...
View Question
What will be the output of the following PHP code?
<?php
$fruits = array (“apple”, “mango”, “peach”, “pear”, “orange”);
$subset = array_splice ($fruits, 2);
print_r ($fruits);
?>
What will be the output of the following PHP code? <?php $fruits ...
View Question
What will be the output of the following PHP code?
<?php
$fruits = array (“apple”, “mango”, “peach”, “pear”, “orange”);
$subset = array_slice ($fruits, 2);
print_r ($subset);
?>
What will be the output of the following PHP code? <?php $fruits ...
View Question
What will be the output of the following PHP code?
<?php
$face = array (“A”, “J”, “Q”, “K”);
$number = array (“2″,”3″,”4”, “5”, “6”, “7”, “8”, “9”, “10”);
$cards = array_merge ($face, $number);
print_r ($cards);
?>
What will be the output of the following PHP code? <?php $face ...
View QuestionWhich function should we use to sort the array in natural order?
a) dsort() b) casesort() c) natcasesort() d) naturalsort() Answer: c Explanation: The function natcasesort() in PHP sorts an array ...
View Question