(No version information available, might only be in Git)
Error::getCode — Gets the error code
Diese Funktion hat keine Parameter.
Returns the error code as integer
Beispiel #1 Error::getCode() example
<?php
try {
throw new Error("Some error message", 30);
} catch(Error $e) {
echo "The Error code is: " . $e->getCode();
}
?>
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
The Error code is: 30