Which of the following is/are an exception? i) OutOfBoundException ii) OutOfRangeException iii) OverflowException iv) UnderflowException a) i) b) i) and iii) c) i) ...
View Question
Which of the following is/are an exception?
i) BadFunctionCallException
ii) BadMethodCallException
iii) LogicException
iv) DomainException
Which of the following is/are an exception? i) BadFunctionCallException ii) BadMethodCallException iii) LogicException iv) DomainException a) Only ii) b) Only iii) c) i), ...
View QuestionHow many predefined exceptions does SPL provide access to?
a) 13 b) 14 c) 15 d) 16 Answer: a Explanation: It provides 13 exceptions: BadFunctionCallException, BadMethodCallException, DomainException, InvalidArgumentException, ...
View QuestionWhat does SPL stand for?
a) Standard PHP Library b) Source PHP Library c) Standard PHP List d) Source PHP List Answer: ...
View QuestionYou can extend the exception base class, but you cannot override any of the preceding methods because the are declared as__________
a) protected b) final c) static d) private Answer: b Explanation: Marking a method as final prevents ...
View QuestionWhich one of the following is the right description for the method getMessage()?
a) Returns the message if it is passed to the constructor b) Returns the message if it is ...
View QuestionWhich of the following statements invoke the exception class?
a) throws new Exception(); b) throw new Exception(); c) new Exception(); d) new ...
View QuestionWhich version added the method getPrevious()?
a) PHP 4 b) PHP 5 c) PHP 5.1 d) PHP 5.3 Answer: d Explanation: The function getPrevious() returns ...
View QuestionHow many methods are available for the exception class?
a) 5 b) 6 c) 7 d) 8 Answer: c Explanation: The seven methods are: ...
View QuestionWhich version of PHP was added with Exception handling?
a) PHP 4 b) PHP 5 c) PHP 5.3 d) PHP 6 Answer: b Explanation: Exception handling ...
View Question