The ________ method in an exception class gets the exception message.
- getMessage()
- getExceptionMessage()
- fetchMessage()
- retrieveErrorMessage()
The correct method for retrieving the exception message in an exception class is getMessage(). This method returns a string describing the exception.
Loading...
Related Quiz
- How can we define a variable accessible in functions of a PHP script?
- The PHP function that compares two arrays and returns the differences is called ________.
- Unlike variables, constants in PHP are automatically ______.
- What is the output of the following code? echo count(array("apple", "banana", "cherry"));
- An interface in PHP OOP is a contract that specifies what methods a class must implement.