Sail E0 Webinar

MCQs

Total Questions : 147 | Page 4 of 15 pages
Question 31. Which one of the following keyword is used to implement an interface?
  1.    interface
  2.    get
  3.    inherit
  4.    implements
 Discuss Question
Answer: Option D. -> implements
Question 32. Which version of PHP introduced the concept called late static binding?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.1
  4.    PHP 5.3
 Discuss Question
Answer: Option D. -> PHP 5.3
Question 33. Which one of the following methods in the exception class, is used to get a nested exception object?
  1.    getPrevious()
  2.    getCode()
  3.    getFile()
  4.    getLine()
 Discuss Question
Answer: Option A. -> getPrevious()
Question 34. Which one of the following keyword is used in conjunction with an Exception object?
  1.    throws
  2.    exception
  3.    throw
  4.    final
 Discuss Question
Answer: Option C. -> throw
Question 35. Which keyword is used to put a stop on inheritance?
  1.    stop
  2.    end
  3.    break
  4.    final
 Discuss Question
Answer: Option D. -> final
Question 36. PHP provides built-in interceptor methods, which can intercept messages sent to undefined methods and properties. This is also known as _________
  1.    overloading
  2.    overriding
  3.    overbending
  4.    overbinding
 Discuss Question
Answer: Option A. -> overloading
Question 37. Which one of the following method is invoked when a value is assigned to an undefined property?
  1.    __get()
  2.    __set()
  3.    __isset()
  4.    __call()
 Discuss Question
Answer: Option B. -> __set()
Question 38. Which method introduced in PHP 5, is invoked just before an object is garbage collected?
  1.    __collect()
  2.    __garbage()
  3.    __destruct()
  4.    __destructor()
 Discuss Question
Answer: Option C. -> __destruct()
Question 39. Which one of the following method is invoked when an undefined method is called by client code?
  1.    __get()
  2.    __isset()
  3.    __unset()
  4.    __call()
 Discuss Question
Answer: Option D. -> __call()
Question 40. Which one of the following statements is true ?
class CopyMe {}
$first = new CopyMe();
$second = $first;
  1.    In PHP 4: $second and $first are 2 distinct objects
  2.    In PHP 5: $second and $first are 2 distinct objects
  3.    In PHP 4: $second and $first refer to one object
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> In PHP 4: $second and $first are 2 distinct objects

Latest Videos

Latest Test Papers