trigger_error()
function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool
Raises a user-level error, warning, or notice.
Parameters:
$message(string)$error_level(int), defaultE_USER_NOTICE, optional
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/core/trigger_error.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how trigger_error is implemented in the compiler, see the internals page.