Error & Exception Handling
1.

How many error levels are available in PHP?

A.  

14

B.  

15

C.  

16

D.  

17

2.

What is the description of Error level E_ERROR?

A.  

Fatal run-time error

B.  

Near-fatal error

C.  

Compile-time error

D.  

Fatal Compile-time error

3.

Which version of PHP introduced E_STRICT Error level?

A.  

PHP 4

B.  

PHP 5

C.  

PHP 5.2

D.  

PHP 5.3

4.

Which character does the error_reporting directive use to represent the logical operator NOT?

A.  

/

B.  


!

C.  

~

D.  

^

5.

Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

A.  

error_reporting = E_ALL

B.  

error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR

C.  

error_reporting = E_ERROR | E_COMPILE_WARNING | E_CORE_ERROR

D.  

error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR

6.

Which version introduced the function error_get_last()?

A.  

PHP 4

B.  

PHP 5

C.  

PHP 5.2

D.  

PHP 5.3

7.

Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?

A.  

ignore_repeated_errors

B.  

ignore_repeat_error

C.  

repeatedly_ignore_error

D.  

repeated_error_ignore

8.

Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?

A.  

define_variable()

B.  

define_log_variable()

C.  

log_variable()

D.  

define_syslog_variable()

9.

Which logging option’s description is if an error occurs when writing to the syslog, send output to the system console?

A.  

LOG_CONS

B.  

LOG_NDELAY

C.  

LOG_ODELAY

D.  

LOG_PERROR

10.

Which function is responsible for sending a custom message to the system log?

A.  

systemlog()

B.  

syslog()

C.  

log_system()

D.  

sys_log()