ExamVeda
Login
Home
11
Which version of PHP was added with Exception handling?
Discuss
Answer & Solution
Answer: Option B
Solution:
Exception handling was added to PHP with the version 5 release, and further enhanced with version 5.3.
12
How many methods are available for the exception class?
Discuss
Answer & Solution
Answer: Option C
Solution:
The seven methods are: getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString().
13
Which version added the method getPrevious()?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
14
Which of the following statements invoke the exception class?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
15
Which one of the following is the right description for the method getMessage() ?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
16
You can extend the exception base class, but you cannot override any of the preceding methods because the are declared as__________
Discuss
Answer & Solution
Answer: Option B
Solution:
Marking a method as final prevents it from being overridden by a subclass.
17
What does SPL stand for?
Discuss
Answer & Solution
Answer: Option A
Solution:
The standard PHP library(SPL) extends PHP by offering ready-made solutions to commonplace tasks such as file access, iteration of various sorts etc.
18
How many predefined exceptions does SPL provide access to?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
Which of the following is/are not an exception?
1. BadFunctionCallException
2. BadMethodCallException
3. LogicException
4. DomainException
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
20
Which of the following is/are an exception?
1. OutOfBoundException
2. OutOfRangeException
3. OverflowException
4. UnderflowException
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board