PHP Error Handling


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    syslog()


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    LOG_CONS



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    If you’re running PHP version 5.2.X or older, you need to execute this function before using any of the following logging functions.


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    ignore_repeated_errors



  1. Which version introduced the function error_get_last()?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    This function returns an associative array consisting of the type, message, file, and line of the last occurring error.