intl_get_error_code

直近のエラーコードを取得する

説明

int intl_get_error_code()

staticメソッドを実行した場合など、 エラーコードを取得するオブジェクトが存在しない場合のエラー処理に便利です。

パラメータ

この関数にはパラメータはありません。

戻り値

直近の API 関数のコールが返すエラーコードを返します。

例1 intl_get_error_code の例

<?php
$coll 
collator_create'<bad_param>' );
if( !
$coll ) {
    
handle_errorintl_get_error_code() );
}
?>

参考

  • intl_is_failure
  • intl_error_name
  • intl_get_error_message
  • collator_get_error_code
  • numfmt_get_error_code