trigger_error()

trigger_error() is a PHP native function, which raises an error, in the style of PHP engine. It can raise notice, warning, deprecated and error.

<?php

    echo $a;

    trigger_error('This is a warning, that says: Undefined variable $x', E_USER_WARNING);

?>

Documentation

See also The trigger_error Function.

Related : @, No Scream Operator, Error Reporting, set_error_handler()