idn_to_utf8
Function • Params and return types changed in PHP 8.0
idn_to_utf8 Function synopsis
idn_to_utf8(
string $domain,
int $flags = IDNA_DEFAULT,
int $variant = INTL_IDNA_VARIANT_UTS46,
&$idna_info = null
): string|false
Parameters
$domain
Typestring
$flags
OptionalTypeintDefault valueIDNA_DEFAULT
$flags accepts one or a bitmask of the following constant values:
IDNA_ALLOW_UNASSIGNEDIDNA_CHECK_BIDIIDNA_CHECK_CONTEXTJIDNA_DEFAULTIDNA_NONTRANSITIONAL_TO_ASCIIIDNA_NONTRANSITIONAL_TO_UNICODEIDNA_USE_STD3_RULES
$variant
OptionalTypeintDefault valueINTL_IDNA_VARIANT_UTS46
$variant accepts one of the following constant values:
$idna_info
Passed by reference, OptionalDefault valuenull
Note that the parameter
$idna_infois passed by reference, and contains additional/updated context data that may be useful.
Return value
Typestring|false
Changes to the idn_to_utf8 Function
PHP 8.0
- Return type added:
string|false - Parameter type added for parameter #1 (
$domain):string - Parameter name of parameter #2 changed:
$optionto$flags - Parameter type added for parameter #2 (
$flags):int - Parameter default value added for position #2 (
$flags):IDNA_DEFAULT - Parameter type added for parameter #3 (
$variant):int - Parameter default value added for position #3 (
$variant):INTL_IDNA_VARIANT_UTS46 - Parameter name of parameter #4 changed:
$idn_infoto$idna_info - Parameter default value added for position #4 (
$idna_info):null
idn_to_utf8(
- $domain,
+ string $domain,
- $option,
+ int $flags = IDNA_DEFAULT,
- $variant,
+ int $variant = INTL_IDNA_VARIANT_UTS46,
- &$idn_info
+ &$idna_info = null
- )
+ ): string|false PHP 5.4
- Optional parameter added - #4:
&$idn_info
idn_to_utf8(
$domain,
$option,
- $status
+ $variant,
+ &$idn_info
) idn_to_utf8 Function Availability
idn_to_utf8 Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | 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 |