Sail E0 Webinar

MCQs

Total Questions : 147 | Page 2 of 15 pages
Question 11. Inheritance is the means by which one or more classes can be derived from a/an ___ class.
  1.    base
  2.    abstract
  3.    null
  4.    predefined
 Discuss Question
Answer: Option A. -> base
Question 12. What should be used to refer to a method in the context of a class rather than an object you use?
  1.    ->
  2.    __
  3.    $
  4.    ::
 Discuss Question
Answer: Option D. -> ::
Question 13. What will be the output of the following PHP code?
  1.    bool(true)
  2.    bool(false)
  3.    error
  4.    none of the above
 Discuss Question
Answer: Option A. -> bool(true)
Question 14. Prior to which version of PHP did constructors took the name of the enclosing class.
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.3
  4.    PHP 5.4
 Discuss Question
Answer: Option B. -> PHP 5
Question 15. Which method or property can only be accessed from within the enclosing class? Even subclasses have no access.
  1.    public
  2.    friendly
  3.    private
  4.    protected
 Discuss Question
Answer: Option C. -> private
Question 16. A mutator method is also called as.
  1.    Setter
  2.    Accessor
  3.    Getter
  4.    Destructor
 Discuss Question
Answer: Option A. -> Setter
Question 17. Which version of PHP introduced the static keyword?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.2
  4.    PHP 5.3
 Discuss Question
Answer: Option B. -> PHP 5
Question 18. Which keyword is used to access a static method or property from within the same class(rather than from child)?
  1.    static
  2.    strat
  3.    self
  4.    set
 Discuss Question
Answer: Option C. -> self
Question 19. In which of the following circumstance should you use a static reference to a non static method?
  1.    Making a method call using parent
  2.    Making a method call using child
  3.    Making an object call using parent
  4.    Making an object call using child
 Discuss Question
Answer: Option A. -> Making a method call using parent
Question 20. Which one of the following variable cannot be used inside a static method?
  1.    $this
  2.    $get
  3.    $set
  4.    $date
 Discuss Question
Answer: Option A. -> $this

Latest Videos

Latest Test Papers