(PHP 5 >= 5.1.0)
Exception::getMessage — Gets the Exception message
Returns the Exception message.
В цієї функції немає параметрів.
Returns the Exception message as a string.
Приклад #1 Exception::getMessage() example
<?php
try {
throw new Exception("Some error message");
} catch(Exception $e) {
echo $e->getMessage();
}
?>
Наведений вище приклад виведе щось подібне до:
Some error message