PHP Conference Japan 2024

intl_get_error_code

(PHP 5 >= 5.3.0, PHP 7, PHP 8, 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() );
}
?>

參見

新增註記

使用者貢獻的註記

此頁面沒有使用者貢獻的註記。
To Top