My Report

PHP OOP Test – 1


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

1. The practice of separating the user from the true inner workings of an application through well-known interfaces is known as _________

2. Which one of the following can be used to instantiate an object in PHP assuming class name to be Foo?

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

4. Which of the following is/are the right way to declare a method?

i) function functionName() { function body }
ii) scope function functionName() { function body }
iii) method methodName() { method body }
iv) scope method methodName() { method body }

5. Which one of the following is the right way to define a constant?

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

7. 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?

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

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

9. Which one of the following property scopes is not supported by PHP?

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


 

Start practicing “1000 MCQs on PHP”, and once you are ready, you can take tests on all topics by attempting our “PHP Test Series”.

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.