Top 350+ Solved Advance PHP MCQ Questions Answer
Q. --------is about writing procedures or functions that perform operations on the data.Sol:
a. procedural programming
b. function programming
c. object oriented programming
d. class
Q. while--------is about creating objects that contain both data and functions.Sol:
a. procedural programming
b. function programming
c. object oriented programming
d. method
Q. A class is defined by using the---keyword, followed by the name of the class and a pairof curly braces ({}). All its properties and methods go inside the bracesSol:
a. procedural programming
b. function programming
c. object oriented programming
d. class
Q. ----are nothing without objects! We can create multiple objects from a classSol:
a. procedural programming
b. function programming
c. object oriented programming
d. class
Q. Each----has all the properties and methods defined in the class, but they will havedifferent property values.Sol:
a. object
b. $this
c. instanceof
d. class
Q. The-----keyword refers to the current object, and is only available inside methodsSol:
a. object
b. $this
c. instanceof
d. class
Q. we change the value of the $name property? There are two ways: Inside the-----&Outside the classSol:
a. object
b. $this
c. instanceof
d. class
Q. You can use the----keyword to check if an object belongs to a specific classSol:
a. object
b. $this
c. instanceof
d. class
Q. A-----allows you to initialize an object's properties upon creation of the objectSol:
a. constructor
b. in
c. instanceof
d. class
Q. If you create a-----function, PHP will automatically call this function when you createan object from a class.Sol:
a. __Construct()
b. ___Destruct()
c. oop
d. class
Q. that the construct function starts with two underscores-------Sol:
a. __ ()
b. ___ ()
c. oop
d. class
Q. A------ is called when the object is destructed or the script is stopped or exited.Sol:
a. constructor
b. destructor
c. oop
d. class
Q. If you create a-----function, PHP will automatically call this function at the endof the scriptSol:
a. __Construct()
b. ___Destruct()
c. oop
d. class