PHP.nl

Error::getMessage

Error::getMessage

Gets the error message

string **Error::getMessage**

Returns the error message.

Returns the error message as a string.

Voorbeeld: example

<?php
try {
    throw new Error("Some error message");
} catch(Error $e) {
    echo $e->getMessage();
}
?>
Some error message

Throwable::getMessage

Documentatie