pub fn php_error(type_: &ErrorType, message: &str) {
    let Ok(c_string) = CString::new(message) else {
        return;
    };

    unsafe {
        php_error_docref(
            std::ptr::null(),
            type_.bits().try_into().expect("Error type flags overflown"),
            c_string.as_ptr(),
        );
    }
}
Trigger an error that is reported in PHP the same way `trigger_error()` is.

See specific error type descriptions at <https://www.php.net/manual/en/errorfunc.constants.php>.

# Panics

* If the error type bits exceed `i32::MAX`.
src/error.rs