user_error
Function • Return type changed in PHP 8.4
Alias of trigger_error
.
user_error
Function synopsis
user_error(string $message, int $error_level = E_USER_NOTICE): true
Parameters
$message
Typestring
$error_level
OptionalTypeint
Default valueE_USER_NOTICE
$error_level
accepts one of the following constant values:
Return value
Typetrue
Changes to the user_error
Function
PHP 8.4
- Return type changed:
bool
totrue
- user_error(string $message, int $error_level = E_USER_NOTICE): bool
+ user_error(string $message, int $error_level = E_USER_NOTICE): true
PHP 8.0
- Return type added:
bool
- Parameter type added for parameter #1 (
$message
):string
- Parameter name of parameter #2 changed:
$error_type
to$error_level
- Parameter type added for parameter #2 (
$error_level
):int
- Parameter default value added for position #2 (
$error_level
):E_USER_NOTICE
- user_error($message, $error_type)
+ user_error(string $message, int $error_level = E_USER_NOTICE): bool
user_error
Function Availability
user_error
Function AvailabilityPHP Version | Availability |
---|---|
PHP 8.5Future Release | Yes |
PHP 8.4Upcoming Release | Yes |
PHP 8.3Supported (Latest) | Yes |
PHP 8.2Supported | Yes |
PHP 8.1Security-Fixes Only | Yes |
PHP 8.0Unsupported | Yes |
PHP 7.4Unsupported | Yes |
PHP 7.3Unsupported | Yes |
PHP 7.2Unsupported | Yes |
PHP 7.1Unsupported | Yes |
PHP 7.0Unsupported | Yes |
PHP 5.6Unsupported | Yes |
PHP 5.5Unsupported | Yes |
PHP 5.4Unsupported | Yes |
PHP 5.3Unsupported | Yes |