Sail E0 Webinar

MCQs

Total Questions : 19 | Page 1 of 2 pages
Question 1. What does SPL stand for?
  1.    Standard PHP Library
  2.    Source PHP Library
  3.    Standard PHP List
  4.    Source PHP List
 Discuss Question
Answer: Option A. -> Standard PHP Library


The standard PHP library(SPL) extends PHP by offering ready-made solutions to commonplace tasks such as file access, iteration of various sorts etc.


Question 2. How many predefined exceptions does SPL provide access to?
  1.    13
  2.    14
  3.    15
  4.    16
 Discuss Question
Answer: Option A. -> 13


13


Question 3. Which of the following is/are not an exception?(i) BadFunctionCallException(ii) BadMethodCallException(iii) LogicException(iv) DomainException
  1.    All of the mentioned
  2.    Only (iv)
  3.    (iii) and (iv)
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


None of the mentioned


Question 4. Which of the following is/are an exception?(i) OutOfBoundException(ii) OutOfRangeException(iii) OverflowException(iv) UnderflowException
  1.    All of the mentioned
  2.    (i) and (iii)
  3.    (i) and (ii)
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> All of the mentioned


All of the mentioned


Question 5. Which version introduced the function error_get_last()?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.2
  4.    PHP 5.3
 Discuss Question
Answer: Option C. -> PHP 5.2


This function returns an associative array consisting of the type, message, file, and line of the last occurring error.


Question 6. How many error levels are available in PHP?
  1.    14
  2.    15
  3.    16
  4.    17
 Discuss Question
Answer: Option C. -> 16


16


Question 7. Which version of PHP was added with Exception handling?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.3
  4.    PHP 6
 Discuss Question
Answer: Option B. -> PHP 5


Exception handling was added to PHP with the version 5 release, and further enhanced with version 5.3.


Question 8. Which character do the error_reporting directive use to represent the logical operator NOT?
  1.    /
  2.    !
  3.    ~
  4.    ^
 Discuss Question
Answer: Option C. -> ~


The twidle (~) character is used to represent the logical operator NOT.


Question 9. What is the description of Error level E_ERROR?
  1.    Fatal run-time error
  2.    Near-fatal error
  3.    Compile-time error
  4.    Fatal Compile-time error
 Discuss Question
Answer: Option A. -> Fatal run-time error


Fatal run-time error


Question 10. Which version of PHP introduced E_STRICT Error level?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.2
  4.    PHP 5.3
 Discuss Question
Answer: Option B. -> PHP 5


Description for E_STRICT is PHP version portability suggestions


Latest Videos

Latest Test Papers