41.
Which keyword must be added before $first variable on the third line of the above question to make $second and $first as distinct objects in PHP 5?

42.
What will be the output of the following PHP code
class Person 
{
    function getName() { return "Bob"; }
    function getAge() { return 44; }
    function __toString() {
        $desc = $this->getName();
        $desc .= " (age ".$this->getAge().")";
        return $desc;
    }
}
$person = new Person();
print $person;

43.
______clone() is run on the _______ object.

45.
What will be the output of the following PHP code?
class Checkout
 {
    final function totalize() 
    {
        // calculate bill
    }
 }
 
class IllegalCheckout extends Checkout 
{
    final function totalize() 
    {
        // change bill calculation
    }
}

47.
Which of the following term originates from the Greek language that means “having multiple forms,” defines OOP’s ability to redefine, a class’s characteristics?

49.
Which one of the following property scopes is not supported by PHP?

Read More Section(Object Oriented Concept)

Each Section contains maximum 100 MCQs question on Object Oriented Concept. To get more questions visit other sections.