Jun 23, 2019 in PHP
Q: 1. Version introduced the advanced concepts of OOP of PHP?

a) PHP 4

b) PHP 5

c) PHP 5.3

d) PHP 6

Answe- B

2. Magic method used to help overloading in PHP?

a) __call

b) __invoke

c) __wakeup

d) __unset

Answer- A

3. Method is used to tweak an objects cloning behavior?

a) clone()

b) __clone()

c) _clone

d) object_clone()

Answer- B

4. If object must inherit behavior from a number of sources you must use a/an

a) Interface

b) Object

c) Abstract class

d) Static class

Answer- A

5. Class from which the child class inherits is called..

i) Child class

ii) Parent class

iii) Super class

iv) Base class

a) Only i)

b) ii), iii) and iv)

c) Only iii)

d) ii) and iv)

Asnwer- D

6. Which of the below advanced OOP features is/are not supported by PHP?

i) Method overloading

ii) Multiple Inheritance

iii) Namespaces

iv) Object Cloning

a) All of the mentioned

b) None of the mentioned

c) i) and ii)

d) iii) and iv)

Answer- C

7. Which is the right way to clone an object?

a) _clone(targetObject);

b) destinationObject = clone targetObject;

c) destinationObject = _clone(targetObject);

d) destinationObject = clone(targetObject);

Answer- B

8. To create a model that will be assumed by a number of closely related objects, which class must be used?

a) Normal class

b) Static class

c) Abstract class

d) Interface

Answer- C

9. Which feature of call more than one method or function of the class in single instruction?

a) Typecasting

b) Method Including

c) Method adding

d) Method chaining

Answer -D

1 Answer

0 votes
Jun 23, 2019








Click here to read more about Loan/Mortgage
Click here to read more about Insurance