Php/docs/function.intl-get-error-code

提供:Dev Guides
< Php
移動先:案内検索

intl_get_error_code

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

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


説明

intl_get_error_code ( ) : int

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


返り値

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


例1 intl_get_error_code() の例

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

参考