← All docs

trigger_error()

Raises a user-level error, warning, or notice.

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), default E_USER_NOTICE, optional

Returns: bool

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how trigger_error is implemented in the compiler, see the internals page.