What is the difference between Exception::getMessage and Exception::getLine?
- getMessage returns the error message associated with the exception, while getLine returns the line number where the exception occurred
- getMessage returns the line number where the exception occurred, while getLine returns the error message associated with the exception
- They both return the same information
- They are not valid methods in the Exception class
Exception::getMessage returns the error message associated with the exception, while Exception::getLine returns the line number where the exception occurred. They provide different information about the exception. Learn more: http://php.net/manual/en/class.exception.php
Loading...
Related Quiz
- Which of the following are common uses of the filter_var() function in PHP?
- What is the purpose of the file_get_contents() function in PHP?
- A PHP class can have more than one constructor.
- Multi-line comments in PHP start with ______ and end with ______.
- Which of the following are true about the while loop in PHP?