Sail E0 Webinar

MCQs

Total Questions : 147 | Page 1 of 15 pages
Question 1. Which one of the following is not a valid class name?
  1.    ShopProduct
  2.    Shopproduct
  3.    Shopproduct1
  4.    1shopproduct
 Discuss Question
Answer: Option D. -> 1shopproduct
Question 2. Fill in the blank with the best option. An Object is a/an ________ of a class.
  1.    type
  2.    prototype
  3.    instance
  4.    object
 Discuss Question
Answer: Option C. -> instance
Question 3. Which version of PHP introduced the visibility keywords i.e public, private, and protected?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.1
  4.    PHP 5.3
 Discuss Question
Answer: Option B. -> PHP 5
Question 4. Which characters is used to access property variables on an object-by-object basis?
  1.    ::
  2.    =
  3.    ->
  4.    .
 Discuss Question
Answer: Option C. -> ->
Question 5. Code that uses a class, function, or method is often described as the.
  1.    client code
  2.    user code
  3.    object code
  4.    class code
 Discuss Question
Answer: Option A. -> client code
Question 6. Which keyword precedes a method name?
  1.    method
  2.    function
  3.    public
  4.    protected
 Discuss Question
Answer: Option B. -> function
Question 7. If you omit the visibility keyword in your method declaration, by default the method will be declared as.
  1.    public
  2.    private
  3.    protected
  4.    friendly
 Discuss Question
Answer: Option A. -> public
Question 8. Which function is used to determine whether the variable’s value is either TRUE or FALSE?
  1.    boolean()
  2.    is_boolean()
  3.    bool()
  4.    is_bool()
 Discuss Question
Answer: Option D. -> is_bool()
Question 9. What will be the output of the following PHP code?
  1.    Error
  2.    Cather: Willa My Antonia (5.99)
  3.    Willa: Cather My Antonia (5.99)
  4.    My Antonia: Willa Cather (5.99)
 Discuss Question
Answer: Option D. -> My Antonia: Willa Cather (5.99)
Question 10. Which version of PHP introduced class type hints?
  1.    PHP 4
  2.    PHP 4.3
  3.    PHP 5
  4.    PHP 5.3
 Discuss Question
Answer: Option C. -> PHP 5

Latest Videos

Latest Test Papers