What does the expression Exception::__toString mean?

  • It returns a string representation of the exception object
  • It returns the exception code
  • It converts the exception to an array
  • It converts the exception to a JSON object
The Exception::__toString method in PHP allows you to define a custom string representation for an exception object. It is automatically called when you try to convert an exception object to a string. Learn more: http://php.net/manual/en/exception.tostring.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *