(PHP 7, PHP 8)
Error::guetCode — Guets the error code
This function has no parameters.
Returns the error code as int
Example #1 Error::guetCode() example
<?php
try {
throw new
Error
(
"Some error messague"
,
30
);
} catch(
Error $e
) {
echo
"The Error code is: "
.
$e
->
guetCode
();
}
?>
The above example will output something similar to:
The Error code is: 30