Q.1
Which keyword is used to declare a constant property?
Q.2
Which one of the following is the correct abstract method?
Q.3
A mutator method is also called as.
Q.4
Which version of PHP introduced the static keyword?
Q.5
Which one of the following is a constant variable?
Q.6
Which keyword is used to access a static method or property from within the same class(rather than from child)?
Q.7
In which of the following circumstance should you use a static reference to a non static method?
Q.8
Code that uses a class, function, or method is often described as the.
Q.9
Which keyword precedes a method name?
Q.10
If you omit the visibility keyword in your method declaration, by default the method will be declared as.
Q.11
Which version of PHP introduced class type hints?
Q.12
Inheritance is the means by which one or more classes can be derived from a/an ___ class.
Q.13
What will be the output of the following PHP code?
<?php
class MyClass
{
}
 
$a = new MyClass;
var_dump(!($a instanceof stdClass));
?>
Q.14
Fill in the blank with the best option. An Object is a/an ________ of a class.
Q.15
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 );
?>
Q.16
What should be used to refer to a method in the context of a class rather than an object you use?
Q.17
Prior to which version of PHP did constructors took the name of the enclosing class.
Q.18
Which version of PHP introduced the visibility keywords i.e public, private, and protected?
Q.19
Which characters is used to access property variables on an object-by-object basis?
Q.20
Which characters is used to access property variables on an object-by-object basis?
0 h : 0 m : 1 s