Statement on glibc/iconv Vulnerability

Locale::getAllVariants

locale_get_all_variants

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

Locale::getAllVariants -- locale_get_all_variantsGirdi yerelindeki tüm lehçeleri döndürür

Açıklama

Nesne yönelimli kullanım

public static Locale::getAllVariants(string $yerel): ?array

Yordamsal kullanım

locale_get_all_variants(string $yerel): ?array

Girdi yerelindeki tüm lehçeleri döndürür.

Bağımsız Değişkenler

yerel

Lehçelerin çıkarılacağı yerel.

Dönen Değerler

Varsa girdi yerelindeki tüm lehçeler bir dizi içinde döner, yoksa null döner.

yerel INTL_MAX_LOCALE_LEN'den uzunsa null döner.

Örnekler

Örnek 1 - locale_get_all_variants() örneği

<?php
$arr
= locale_get_all_variants('sl_IT_NEDIS_ROJAZ_1901');
var_export( $arr );
?>

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

<?php
$arr
= Locale::getAllVariants('sl_IT_NEDIS_ROJAZ_1901');
var_export( $arr );
?>

Yukarıdaki örneğin çıktısı:

array (
    0 => 'NEDIS',
    1 => 'ROJAZ',
    2 => '1901',
)

Ayrıca Bakınız

add a note

User Contributed Notes

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