CakeFest 2024: The Official CakePHP Conference

NumberFormatter::getErrorCode

numfmt_get_error_code

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

NumberFormatter::getErrorCode -- numfmt_get_error_codeBiçemleyicinin son hata numarası ile döner

Açıklama

Nesne yönelimli kullanım

public NumberFormatter::getErrorCode(): int

Yordamsal kullanım

numfmt_get_error_code(NumberFormatter $biçemleyici): int

Biçimleyicinin çağrılan son işlevinden dönen hatanın numarasını döndürür.

Bağımsız Değişkenler

biçemleyici

NumberFormatter nesnesi.

Dönen Değerler

Biçimleyicinin çağrılan son işlevinden dönen hatanın numarası.

Örnekler

Örnek 1 - numfmt_get_error_code() örneği

<?php
$fmt
= numfmt_create( 'tr_TR', NumberFormatter::DECIMAL );
$data = numfmt_format($fmt, 1234567.891234567890000);
if(
intl_is_failure(numfmt_get_error_code($fmt))) {
report_error("Biçemleyici hatası");
}
?>

Örnek 2 - Nesne yönelimli kullanım örneği

<?php
$fmt
= new NumberFormatter( 'tr_TR', NumberFormatter::DECIMAL );
$fmt->format(1234567.891234567890000);
if(
intl_is_failure($fmt->getErrorCode())) {
report_error("Biçemleyici hatası");
}
?>

Ayrıca Bakınız

add a note

User Contributed Notes

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