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

senior

What is the crucial difference between using traits versus interfaces?

middle

Are Parent constructors called implicitly inside a class constructor?

junior

Differentiate between echo and print()

Bình luận

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

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