Q.1
Which function was introduced to help automate the inclusion of class files?
Q.2
Which magic method is used to implement overloading in PHP?
Q.3
A package is a set of related _________
Q.4
Till which version of PHP, developers were forced to name their files in a global context?
Q.5
Which of the following can you place inside a namespace?
1. classes
2. functions
3. variables
Q.6
Which one of the following is the correct way of declaring a namespace?
Q.7
Which of the following is/are true for an abstract class?
1. A class is declared abstract by prefacing the definition with the word abstract.
2. A class is declare abstract by using the keyword implements.
3. It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class.
4. Attempting to instantiate an abstract class results in an error.
Q.8
If one intends to create a model that will be assumed by a number of closely related objects, which class must be used?
Q.9
Which keyword allows class members (methods and properties) to be used without needing to instantiate a new instance of the class?
Q.10
Which of the following advanced OOP features is/are not supported by PHP?
1. Method overloading
2. Multiple Inheritance
3. Namespaces
4. Object Cloning
Q.11
If your object must inherit behavior from a number of sources you must use a/an
Q.12
Which method is used to tweak an object’s cloning behavior?
Q.13
Which feature allows us to call more than one method or function of the class in single instruction?
Q.14
Which version of PHP introduced the advanced concepts of OOP?
Q.15
Which one of the following is the right way to clone an object?
Q.16
The class from which the child class inherits is called.
1. Child class
2. Parent class
3. Super class
4. Base class
Q.17
Which one of the following functions is used to determine whether a class exists?
Q.18
Which one of the following functions is used to determine object type?
Q.19
Which one of the following keyword is used to inherit our subclass into a superclass?
Q.20
In the PHP code given below, what is/are the properties?
<?php
    class Example 
    {
        public $name;
        function Sample()
        {
            echo "This is an example";
        }
    } 
?>
Q.21
Which keyword is used to refer to properties or methods within the class itself?
Q.22
Which of the following method scopes is/are not supported by PHP?
1. private
2. final
3. static
4 abstract
Q.23
Which method scope prevents a method from being overridden by a subclass?
Q.24
Which of the following statements is/are true about Constructors in PHP?
1. PHP 4 introduced class constructors.
2. Constructors can accept parameters.
3. Constructors can call class methods or other functions.
4. Class constructors can call on other constructors.
Q.25
PHP recognizes constructors by the name_________
Q.26
Which version of PHP introduced the instanceof keyword?
Q.27
Which one of the following can be used to instantiate an object in PHP assuming class name to be Foo?
Q.28
Which one of the following is the right way to define a constant?
Q.29
Which one of the following is the right way to call a class constant, given that the class is mathFunction?
Q.30
Which one of the following is the right way to invoke a method?
0 h : 0 m : 1 s