Sail E0 Webinar

MCQs

Total Questions : 147 | Page 9 of 15 pages
Question 81. Which one of the following statements is true for require() and require_once()?
  1.    They are functions
  2.    They are statements
  3.    They’ll not work if the () is not present
  4.    They can not be used to require files
 Discuss Question
Answer: Option B. -> They are statements
Question 82. Which one of the following statements is true for include_once() and require_once()?
  1.    Both are exactly the same
  2.    include_once is used for files where as require_once() is not
  3.    Both Handle the errors in the same way
  4.    Both do not handle the errors in the same way
 Discuss Question
Answer: Option D. -> Both do not handle the errors in the same way
Question 83. Which function was introduced to help automate the inclusion of class files?
  1.    __load()
  2.    __preload()
  3.    __autoload()
  4.    __inload()
 Discuss Question
Answer: Option C. -> __autoload()
Question 84. How many times can you define _______ autoload in a process?
  1.    once
  2.    twice
  3.    thrice
  4.    as many times as needed
 Discuss Question
Answer: Option A. -> once
Question 85. Which one of the following functions will you use to check that the class exists before you work with it?
  1.    class_exist()
  2.    class_exists()
  3.    exist()
  4.    exists_class()
 Discuss Question
Answer: Option B. -> class_exists()
Question 86. Which one of the following will you use to check the class of an object?
  1.    class()
  2.    _class()
  3.    class_check()
  4.    get_class()
 Discuss Question
Answer: Option D. -> get_class()
Question 87. PHP 4 did not support instanceof. Instead, which function did it provide?
  1.    is()
  2.    get_class()
  3.    is_a()
  4.    is_the()
 Discuss Question
Answer: Option C. -> is_a()
Question 88. You use the get_class_methods() function to return the names of all the methods in the class. Which function will you use to print it on the screen?
  1.    printf()
  2.    print_ar
  3.    print_r
  4.    echo
 Discuss Question
Answer: Option C. -> print_r
Question 89. If you call a method and it doesn’t exist it’ll cause a problem. To check the method which function will you use?
  1.    _method()
  2.    methodexists()
  3.    is_callable()
  4.    is_method()
 Discuss Question
Answer: Option C. -> is_callable()
Question 90. What will be the output if a protected method is given as argument to the function method_exist()?
  1.    Method does not exist
  2.    False
  3.    Error
  4.    True
 Discuss Question
Answer: Option D. -> True

Latest Videos

Latest Test Papers