MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
PHP
Exceptions And Error Handling
Quiz 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Q.1
Which version introduced the function error_get_last()?
PHP 4
PHP 5
PHP 5.2
PHP 5.3
Q.2
Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?
ignore_repeated_errors
ignore_repeat_error
repeatedly_ignore_error
repeated_error_ignore
Q.3
Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?
define_variable()
define_log_variable()
log_variable()
define_syslog_variable()
Q.4
Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?
LOG_CONS
LOG_NDELAY
LOG_ODELAY
LOG_PERROR
Q.5
Which function is responsible for sending a custom message to the system log?
systemlog()
syslog()
log_system()
sys_log()
Q.6
Which version added the method getPrevious()?
PHP 4
PHP 5
PHP 5.1
PHP 5.3
Q.7
Which of the following statements invoke the exception class?
throws new Exception();
throw new Exception();
new Exception();
new throws Exception();
Q.8
Which one of the following is the right description for the method getMessage() ?
Returns the message if it is passed to the constructor
Returns the message if it is passed to the class
Returns the message if it is passed to the file
Returns the message if it is passed to the object
Q.9
Which version of PHP was added with Exception handling?
PHP 4
PHP 5
PHP 5.3
PHP 6
Q.10
How many methods are available for the exception class?
5
6
7
8
Q.11
You can extend the exception base class, but you cannot override any of the preceding methods because the are declared as__________
protected
final
static
private
Q.12
What does SPL stand for?
Standard PHP Library
Source PHP Library
Standard PHP List
Source PHP List
Q.13
How many predefined exceptions does SPL provide access to?
13
14
15
16
Q.14
Which of the following is/are not an exception?
1. BadFunctionCallException
2. BadMethodCallException
3. LogicException
4. DomainException
All of the mentioned
Only 4
3 and 4
None of the mentioned
Q.15
Which of the following is/are an exception?
1. OutOfBoundException
2. OutOfRangeException
3. OverflowException
4. UnderflowException
All of the mentioned
1 and 3
1 and 2
None of the mentioned
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page