« 国際化 関数
intl_get_error_code »

intl_error_name

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

intl_error_name — 指定したエラーコードに対応する名前を取得する

説明

function intl_error_name(int $errorCode): string

ICU のエラーコード名を返します。

パラメータ

errorCode

ICU のエラーコード。

戻り値

エラーコード定数と同じ名前の文字列を返します。

例

例1 intl_error_name() の例

<?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 ) );
?>

上の例の出力は、 たとえば以下のようになります。

Symbolic name for -128 is U_USING_FALLBACK_WARNING.

参考

関連キーワード:
intl   エラーコード   code   国際化   errorCode   coll   collator   Symbolic   直近   定数   create   printf   参考   failure   message
関連する関数・ページ:
function.intl-get-error-code   function.intl-is-failure   ref.intl   function.intl-get-error-message   function.fdf-error   intlcalendar.geterrorcode