Câu hỏi phỏng vấn PHP
Câu hỏi

What are the exception class functions?

Câu trả lời

Here are the key exception class functions in PHP:

Exception Class Functions

  1. getMessage(): Returns the error message associated with the exception.

  2. getCode(): Returns the error code associated with the exception.

  3. getFile(): Returns the filename where the exception was thrown.

  4. getLine(): Returns the line number where the exception was thrown.

  5. getTrace(): Returns the backtrace of the exception.

  6. getTraceAsString(): Returns the backtrace of the exception as a string.

  7. __toString(): Returns a string representation of the exception object.

Here's an ex...

middle

middle

Gợi ý câu hỏi phỏng vấn

junior

How is it possible to set an infinite execution time for PHP script?

middle

Differentiate between exception and error

entry

What is the purpose of php.ini file?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào