首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

intl_error_name

(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)

intl_error_name — Get symbolic name for a given error code

Description

代码语言:javascript
复制
string intl_error_name ( int $error_code )

Return ICU error code name.

Parameters

error_code

ICU error code.

Return Values

The returned string will be the same as the name of the error code constant.

Examples

Example #1 intl_error_name() example

代码语言:javascript
复制
<?php
$coll?????=?collator_create(?'en_RU'?);
$err_code?=?collator_get_error_code(?$coll?);

printf(?"Symbolic?name?for?%d?is?%s\n.",?$err_code,?intl_error_name(?$err_code?)?);
?>

The above example will output something similar to:

代码语言:javascript
复制
Symbolic name for -128 is U_USING_FALLBACK_WARNING.

See Also

  • intl_is_failure() - Check whether the given error code indicates failure
  • intl_get_error_code() - Get the last error code
  • intl_get_error_message() - Get description of the last error

intl_get_error_code →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com