1.
Which one of the following is not a valid class name?

2.
Fill in the blank with the best option. An Object is a/an ________ of a class.

3.
Which version of PHP introduced the visibility keywords i.e public, private, and protected?

4.
Which characters is used to access property variables on an object-by-object basis?

6.
Code that uses a class, function, or method is often described as the.

7.
Which keyword precedes a method name?

8.
If you omit the visibility keyword in your method declaration, by default the method will be declared as.

10.
What will be the output of the following PHP code?
<?php
class ShopProductWriter
{
    public function write($shopProduct)
    {
      $str = "{$shopProduct->title}: " .$shopProduct->getProducer() ." ({$shopProduct->price})n";
      print $str;
    }
}
$product1 = new ShopProduct( "My Antonia", "Willa", "Cather", 5.99 );
$writer = new ShopProductWriter();
$writer->write( $product1 );
?>

Read More Section(Object Oriented Concept)

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