My Report

PHP Programming Mock Test 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. The practice of creating objects based on predefined classes is often referred to as ______________

Question 1 of 10

Question 2 of 10

2. Which function is responsible for sending a custom message to the system log?

Question 2 of 10

Question 3 of 10

3. Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

Question 3 of 10

Question 4 of 10

4. What will be the output of the following PHP code?

<?php
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$a2 = array("e" => "red","f" => "green", "g" => "blue");
$result = array_intersect($a1, $a2);
print_r($result);
?>

Question 4 of 10

Question 5 of 10

5. Which of the following method scopes is/are not supported by PHP?

i) private
ii) friendly
iii) static
iv) abstract

Question 5 of 10

Question 6 of 10

6. Which one of the following is the right way to call a class constant, given that the class is mathFunction?

Question 6 of 10

Question 7 of 10

7. Which function should we use to sort the array in natural order?

Question 7 of 10

Question 8 of 10

8. Which keyword is used to refer to properties or methods within the class itself?

Question 8 of 10

Question 9 of 10

9. Which of the following term originates from the Greek language that means "having multiple forms," defines OOP's ability to redefine, a class's characteristics?

Question 9 of 10

Question 10 of 10

10. Which one of the following is the right way to invoke a method?

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.