ExamVeda
Login
Home
61
Which one of the following functions is used to determine object type?
Discuss
Answer & Solution
Answer: Option C
Solution:
The is_a() function returns true if object belongs to a class type or if it belongs to a class that is a child of that class. Or else false is returned.
62
Which one of the following keyword is used to inherit our subclass into a superclass?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
63
In the PHP code given below, what is/are the properties?
<?php
    class Example 
    {
        public $name;
        function Sample()
        {
            echo "This is an example";
        }
    } 
?>
Discuss
Answer & Solution
Answer: Option B
Solution:
Yes they are nothing but variables.
64
Which keyword is used to refer to properties or methods within the class itself?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
65
Which keyword allows class members (methods and properties) to be used without needing to instantiate a new instance of the class?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
66
Which of the following advanced OOP features is/are not supported by PHP?
1. Method overloading
2. Multiple Inheritance
3. Namespaces
4. Object Cloning
Discuss
Answer & Solution
Answer: Option C
Solution:
The advanced OOP features are: Object cloning, Inheritance, Interfaces, Abstract classes, and Namespaces.
67
Which version of PHP introduced the advanced concepts of OOP?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
68
Which one of the following is the right way to clone an object?
Discuss
Answer & Solution
Answer: Option B
Solution:
You can clone an object by prefacing it with the clone keyword.
69
The class from which the child class inherits is called.
1. Child class
2. Parent class
3. Super class
4. Base class
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
70
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.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board