Read Also: Top 20 MCQ Questions on Namespaces in PHP
1) There are … separate error levels are available in PHP.
A. Fifteen
B. Sixteen
C. Seventeen
D. Eighteen
2) The … error level was introduced in …
A. PHP 5.2
B. PHP 5.3
C. PHP 5.4
D. PHP 6
3) In PHP’s error reporting, the … level reports fatal run-time errors.
A. E_ERROR
B. E_RUN_ERROR
C. E_NOTICE
D. R_ERROR
4) In PHP’s error reporting, the … level reports compile-time parse errors.
A. E_ERROR
B. E_PARSE_ERROR
C. E_COMPILE_PARSE
D. E_PARSE
5) In the … level, warnings regarding user-initiated use of features scheduled for removal in future PHP release.
A. E_DEPRECATED
B. E_USER_DEPRECATED
C. E_USER_ERROR
D. E_USER_REMOVAL
6) The error level … suggest code changes based on the developer’s determinations as to proper coding methodologies and is intended to ensure portability across PHP versions.
A. E_STRICT
B. E_WARNING
C. E_USER_WARNING
D. E_SUGGESTS
7) In PHP error handling, the … directives determine the reporting sensitivity level.
A. display_errors
B. error_reporting
C. error_log
D. display_startup_errors
8) Enabling the … directive results in the display of any errors meeting the criteria defined by error_reporing.
A. display_errors
B. log_error
C. error_log
D. display_startup_errors
9) The … directive will display any error encountered during the initialization of the PHP engine.
A. display_errors
B. error_reporting
C. error_log
D. display_startup_errors
10) Errors can be sent to the system logging daemon or can be sent to a file specified by the administrator via the … directives.
A. display_errors
B. error_reporting
C. error_log
D. display_startup_errors
11) Enabling … causes PHP to disregard repeated error messages that occur within the same file on the same line.
A. ignore_repeated_errors
B. ignore_repeated_source
C. repeated_error_messages
D. ignore_repeated_error_messages
12) Enabling … causes PHP to disregarded repeated error messages emanating from different files or different lines within the same file.
A. ignore_repeated_errors
B. ignore_repeated_source
C. repeated_error_messages
D. ignore_repeated_error_messages
13) While opening the logging connection, the … option immediately opens the connection to the Syslog.
A. LOG_CONS
B. LOG_DELAY
C. LOG_NDELAY
D. LOG_ODELAY
14) While opening the logging connection, the … option does not open the connection until the first message has been submitted for logging.
A. LOG_CONS
B. LOG_DELAY
C. LOG_NDELAY
D. LOG_ODELAY
15) … is the parameter of Syslog() function which specifies a serious system problem, likely signaling a crash.
A. LOG_EMERG
B. LOG_CRIT
C. LOG_ERR
D. LOG_WARNING
16) … is the parameter of Syslog() function which specifies a critical error that could render a service unusable but does not necessarily place the system in danger.
A. LOG_EMERG
B. LOG_CRIT
C. LOG_ERR
D. LOG_WARNING
17) State whether the following statements about PHP’s logging facility are TRUE or FALSE.
i. PHP’s logging facilities will automatically be initialized when the openlog() or Syslog() functions are called.
ii. Calling the openlog() function is necessary.
iii.The Syslog() function is responsible for sending a custom message to the system log.
A. i-True, ii-True, iii-False
B. i-True, ii-False, iii-False
C. i-True, ii-False, iii-True
D. i-True, ii-True, iii-True
18) The error level … indicate that the script encountered something that could indicate an error.
A. E_ERROR
B. E_RUN_ERROR
C. E_NOTICE
D. R_ERROR
19) Enabling … causes PHP to store the most recent error message in the variable $php_errormsg.
A. display_errors
B. track_errors
C. track_recent_errors
D. display_track_errors
20) In the openlog() function, the logging option … will output the logged message to both the Syslog and standard error.
A. LOG_PERROR
B. LOG_PID
C. LOG_CONS
D. LOG_DELAY
Answers
- B. Sixteen
- C. PHP 5.4
- A. E_ERROR
- D. E_PARSE
- B. E_USER_DEPRECATED
- A. E_STRICT
- B. error_reporting
- A. display_errors
- D. display_startup_errors
- C. error_log
- A. ignore_repeated_errors
- B. ignore_repeated_source
- C. LOG_NDELAY
- D. LOG_ODELAY
- A. LOG_EMERG
- B. LOG_CRIT
- C. i-True, ii-False, iii-True
- C. E_NOTICE
- B. track_errors
- A. LOG_PERROR
Read Next: Top 20 MCQ Questions on Exception Handling in PHP