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

middle

What is the difference between using self and $this ?

entry

What are the keys & values in an indexed array?

junior

What are PSRs? Choose 1 and briefly describe it

Bình luận

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

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