CakeFest 2024: The Official CakePHP Conference

intl_error_name

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

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

説明

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.

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top