PHP OOP Mcqs
Our collections of Multiple choice questions and answers focuses on study of PHP OOP. These questions are chosen from a collection of most authoritative and best reference books on PHP Language. Our aim is to prepare an individual for competitive exams like NTS, GAT, ECAT, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate PHP OOP Topics comprehensively.
PHP Programming Mcqs
- Basics of PHP Mcqs
- PHP Arrays and Functions Mcqs
- PHP Constants and Operators Mcqs
- PHP Controls Structures Mcqs
- PHP Error and Exception Handling Mcqs
- PHP Filesystem Mcqs
- PHP Functions Mcqs
- PHP Objects Tools and Variables Mcqs
- PHP OOP Mcqs
- PHP Session Handling Mcqs
- Strings and Regular Expressions Mcqs
Computer MCQS
Sciences MCQS
17.
If everything is fine in object selftest ( ) function returns what?
TRUE
FALSE
Diagnostic string
Noting
18.
PHP supports
Public variables
Private variables
Protected variables
All of them
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
19.
Namespaces defines a area in which an identifier is
Unique
Same type
Static
None of them
20.
To ask objects about their classes, and ask classes about their parents without searching in code, is example of
Serialization
Inspection
Introspection
Equalization
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
21.
Parent class is a
Super class
Base class
Derived class
Both a and b
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
22.
Pear coding style recommends that class name begins with
Lowercase letter
Uppercase letter
Letter A
Both a and b
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
23.
Destruct ( ) function is used to call a
Constructor
Destructor
Object
Method
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
24.
PHP does not support multiple inheritance but it supports
Chained subclassing
Classified subclassing
Unique subclassing
None of them
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
25.
The practice of separating the user from the true inner workings of an application through well-known interfaces is known as _________
Polymorphism
Inheritance
Encapsulation
Abstraction
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
27.
The practice of creating objects based on predefined classes is often referred to as..
Class creation
Object creation
Object instantiation
Class instantiation
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
28.
Which one of the following property scopes is not supported by PHP?
Friendly
Final
Public
Static
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
29.
Which one of the following can be used to instantiate an object in PHP assuming class name to be Foo?
$obj = new $foo;
$obj = new foo;
$obj = new foo ();
Obj = new foo ();
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
30.
Which one of the following is the right way to define a constant?
constant PI = “3.1415”;
const $PI = “3.1415”;
constant PI = ‘3.1415’;
const PI = ‘3.1415’;
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
31.
Which one of the following is the right way to call a class constant, given that the class is mathFunction?
Echo PI;
Echo mathFunction->PI;
Echo mathFunction::PI;
Echo mathFunction=PI;
Answer & Solution
No Solution for this Answer..! Report or Discus this Question