My Report

PHP Programming Mock Test 6


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. Which one of the following keywords are used to define an abstract class?

Question 1 of 10

Question 2 of 10

2. Which one of the following class can not be instantiated?

Question 2 of 10

Question 3 of 10

3. PHP provides built-in interceptor methods, which can intercept messages sent to undefined methods and properties. This is also known as _________

Question 3 of 10

Question 4 of 10

4. Which one of the following functions will you use to check that the class exists before you work with it?

Question 4 of 10

Question 5 of 10

5. Inheritance in class diagrams is depicted by________

Question 5 of 10

Question 6 of 10

6. Which keyword is used to put a stop on inheritance?

Question 6 of 10

Question 7 of 10

7. Output:

    namespace main;
    com\getinstance\util\Debug::helloWorld()
PHP Fatal error: Class 'main\com\getinstance\util\Debug' not found in ...

Using which one of the following PHP lines will the error be removed?

Question 7 of 10

Question 8 of 10

8. Which one of the following is displayed in the third section of the class diagram?

Question 8 of 10

Question 9 of 10

9. Which one of the following is the correct way of declaring a namespace?

Question 9 of 10

Question 10 of 10

10. Which keyword must be added before $first variable on the third line of the above question to make $second and $first as distinct objects in PHP 5?

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.