From d2dfaea386beee457d9bf5d5942318305a4a66cb Mon Sep 17 00:00:00 2001 From: leonardolara Date: Tue, 17 Nov 2026 14:47:25 -0300 Subject: [PATCH 1/2] Sync with en rev --- language/predefined/interfaces.xml | 3 +- language/predefined/sortdirection.xml | 104 ++++++++++++++++++ reference/filter/functions/filter-has-var.xml | 36 +++++- .../filter/functions/filter-input-array.xml | 61 +++++++++- reference/filter/functions/filter-input.xml | 44 +++++++- .../filter/functions/filter-var-array.xml | 45 +++++++- reference/filter/functions/filter-var.xml | 14 ++- reference/hash/functions/hash-file.xml | 16 ++- reference/hash/functions/hash-init.xml | 16 ++- reference/hash/functions/hash.xml | 16 ++- reference/intl/dateformatter-constants.xml | 4 +- reference/intl/dateformatter/create.xml | 74 ++++++++++++- .../openssl/functions/openssl-pbkdf2.xml | 10 +- 13 files changed, 413 insertions(+), 30 deletions(-) create mode 100644 language/predefined/sortdirection.xml diff --git a/language/predefined/interfaces.xml b/language/predefined/interfaces.xml index 4069d745d..aa881a734 100644 --- a/language/predefined/interfaces.xml +++ b/language/predefined/interfaces.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ &language.predefined.stringable; &language.predefined.unitenum; &language.predefined.backedenum; + &language.predefined.sortdirection; &language.predefined.sensitiveparametervalue; &language.predefined.php-incomplete-class; diff --git a/language/predefined/sortdirection.xml b/language/predefined/sortdirection.xml new file mode 100644 index 000000000..8ea8c55a0 --- /dev/null +++ b/language/predefined/sortdirection.xml @@ -0,0 +1,104 @@ + + + A enumeração SortDirection + SortDirection + + +
+ &reftitle.intro; + + A enumeração SortDirection é usada para especificar a + direção na qual os valores são ordenados. + + + + A partir do PHP 8.6.0, nenhuma das funções incluídas no PHP aceita uma + SortDirection. Por exemplo, + array_multisort ainda espera + SORT_ASC ou SORT_DESC. + + +
+ +
+ &reftitle.enumsynopsis; + + + SortDirection + + + Ascending + + + + Descending + + +
+ +
+ &reftitle.examples; + + Ordenando nomes com <enumname>SortDirection</enumname> + + sort($names), + SortDirection::Descending => rsort($names), + }; + + return $names; +} + +$names = ['Charlie', 'Alice', 'Bob']; + +print_r(sortNames($names, SortDirection::Descending)); +]]> + + &example.outputs; + + Charlie + [1] => Bob + [2] => Alice +) +]]> + + +
+ +
+ &reftitle.seealso; + + Ordenando arrays + Enumerações + +
+
+
+ diff --git a/reference/filter/functions/filter-has-var.xml b/reference/filter/functions/filter-has-var.xml index b6ff4b191..e47a8615b 100755 --- a/reference/filter/functions/filter-has-var.xml +++ b/reference/filter/functions/filter-has-var.xml @@ -1,5 +1,5 @@ - + @@ -45,6 +45,40 @@ + + &reftitle.errors; + + Lança uma ValueError se + input_type não for uma das constantes + INPUT_*. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + Agora uma ValueError é lançada se + input_type não for uma das constantes + INPUT_*; + anteriormente, &false; era retornado. + + + + + + + + filter_input_array @@ -73,6 +73,65 @@ + + &reftitle.errors; + + Lança uma ValueError se + type não for uma das + constantes INPUT_*. + + + Se o array de entrada designado por type estiver populado, + lança uma TypeError se + options for um &array; com uma chave que não seja uma + &string;, e uma ValueError se tiver uma chave vazia. + + + A partir do PHP 8.5.0, lança uma + Filter\FilterFailedException se a + flag FILTER_THROW_ON_FAILURE for usada para uma entrada + presente no array de entrada e seu filtro falhar, + e uma ValueError se essa flag for usada junto com + FILTER_NULL_ON_FAILURE para tal entrada. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + Agora uma ValueError é lançada se + type não for uma das + constantes INPUT_*; + anteriormente, o array de entrada era tratado como não populado. + + + + 8.0.0 + + Se o array de entrada designado por type estiver + populado, lança-se agora uma TypeError se + options tiver uma chave que não seja uma &string;, + e uma ValueError se tiver uma chave vazia; + anteriormente, um E_WARNING era emitido e &false; + era retornado. + + + + + + + &reftitle.examples; diff --git a/reference/filter/functions/filter-input.xml b/reference/filter/functions/filter-input.xml index 57c4babbf..06a00052b 100755 --- a/reference/filter/functions/filter-input.xml +++ b/reference/filter/functions/filter-input.xml @@ -1,5 +1,5 @@ - + filter_input @@ -62,6 +62,48 @@ + + &reftitle.errors; + + Lança uma ValueError se + type não for uma das + constantes INPUT_*. + + + A partir do PHP 8.5.0, lança uma + Filter\FilterFailedException se a + flag FILTER_THROW_ON_FAILURE for usada e + o filtro falhar ou a variável var_name não estiver definida, + e uma ValueError se essa flag for usada junto com + FILTER_NULL_ON_FAILURE. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + Agora uma ValueError é lançada se + type não for uma das + constantes INPUT_*; + anteriormente, a variável era tratada como não definida. + + + + + + + &reftitle.examples; diff --git a/reference/filter/functions/filter-var-array.xml b/reference/filter/functions/filter-var-array.xml index 452e32426..b39fa5f88 100755 --- a/reference/filter/functions/filter-var-array.xml +++ b/reference/filter/functions/filter-var-array.xml @@ -1,5 +1,5 @@ - + filter_var_array @@ -102,6 +102,49 @@ + + &reftitle.errors; + + Lança uma TypeError se + options for um &array; com uma chave que não seja uma + &string;, e uma ValueError se tiver uma chave vazia. + + + A partir do PHP 8.5.0, lança uma + Filter\FilterFailedException se a + flag FILTER_THROW_ON_FAILURE for usada para uma entrada + presente em array e seu filtro falhar, + e uma ValueError se essa flag for usada junto com + FILTER_NULL_ON_FAILURE para tal entrada. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.0.0 + + Agora uma TypeError é lançada se + options tiver uma chave que não seja uma &string;, + e uma ValueError se tiver uma chave vazia; + anteriormente, um E_WARNING era emitido e &false; + era retornado. + + + + + + + &reftitle.examples; diff --git a/reference/filter/functions/filter-var.xml b/reference/filter/functions/filter-var.xml index 4ef12456b..8d2ddf97f 100755 --- a/reference/filter/functions/filter-var.xml +++ b/reference/filter/functions/filter-var.xml @@ -1,5 +1,5 @@ - + filter_var @@ -89,6 +89,18 @@ + + &reftitle.errors; + + A partir do PHP 8.5.0, lança uma + Filter\FilterFailedException se a + opção FILTER_THROW_ON_FAILURE for usada e + o filtro falhar, + e uma ValueError se essa opção for usada junto com + FILTER_NULL_ON_FAILURE. + + + &reftitle.examples; diff --git a/reference/hash/functions/hash-file.xml b/reference/hash/functions/hash-file.xml index dfa2e2a4e..b1da73ea7 100644 --- a/reference/hash/functions/hash-file.xml +++ b/reference/hash/functions/hash-file.xml @@ -1,5 +1,5 @@ - + @@ -51,9 +51,17 @@ options - Um array de opções para os vários algoritmos de hash. - Atualmente, apenas o parâmetro "seed" é - suportado pelas variantes MurmurHash. + Um array de opções para os vários algoritmos de hash: + + + 'seed' (int) + Suportado pelas variantes MurmurHash3 e XXHash. + + + 'secret' (string) + Suportado por xxh3 e xxh128. + + diff --git a/reference/hash/functions/hash-init.xml b/reference/hash/functions/hash-init.xml index 7e277de85..3f4890250 100644 --- a/reference/hash/functions/hash-init.xml +++ b/reference/hash/functions/hash-init.xml @@ -1,5 +1,5 @@ - + @@ -60,9 +60,17 @@ options - Um array de opções para os vários algoritmos de hash. - Atualmente, apenas o parâmetro "seed" é - suportado pelas variantes MurmurHash. + Um array de opções para os vários algoritmos de hash: + + + 'seed' (int) + Suportado pelas variantes MurmurHash3 e XXHash. + + + 'secret' (string) + Suportado por xxh3 e xxh128. + + diff --git a/reference/hash/functions/hash.xml b/reference/hash/functions/hash.xml index 2abf56d6a..946b7190b 100644 --- a/reference/hash/functions/hash.xml +++ b/reference/hash/functions/hash.xml @@ -1,5 +1,5 @@ - + hash @@ -50,9 +50,17 @@ options - Um array de opções para os vários algoritmos de hash. - Atualmente, apenas o parâmetro "seed" é - suportado pelas variantes MurmurHash. + Um array de opções para os vários algoritmos de hash: + + + 'seed' (int) + Suportado pelas variantes MurmurHash3 e XXHash. + + + 'secret' (string) + Suportado por xxh3 e xxh128. + + diff --git a/reference/intl/dateformatter-constants.xml b/reference/intl/dateformatter-constants.xml index f870d9fe1..af30de636 100644 --- a/reference/intl/dateformatter-constants.xml +++ b/reference/intl/dateformatter-constants.xml @@ -1,5 +1,5 @@ - +
&reftitle.constants; @@ -130,7 +130,7 @@ int - Calendário Não Gregoriano + O calendário padrão da localidade diff --git a/reference/intl/dateformatter/create.xml b/reference/intl/dateformatter/create.xml index 95240f3ff..7f53fbfaf 100644 --- a/reference/intl/dateformatter/create.xml +++ b/reference/intl/dateformatter/create.xml @@ -1,5 +1,5 @@ - + IntlDateFormatter::create @@ -61,6 +61,14 @@ Localidade a ser utilizada ao formatar ou interpretar, ou &null; para utilizar o valor especificado na configuração ini intl.default_locale. + + Tanto en_US quanto en-US são aceitos. + A localidade pode conter palavras-chave da ICU, como + fa_IR@calendar=persian, mas a + palavra-chave calendar só altera o calendário usado quando + calendar é + IntlDateFormatter::TRADITIONAL. + @@ -117,15 +125,34 @@ se &null; for fornecido para o parâmetro timezone, também definirá o fuso horário utilizado. + + IntlDateFormatter::GREGORIAN sempre usa o + calendário gregoriano, mesmo que a localidade tenha uma palavra-chave calendar. + IntlDateFormatter::TRADITIONAL usa o + calendário padrão da localidade: aquele definido pela palavra-chave + calendar se houver, caso contrário, aquele definido + pela ICU para a região da localidade (por exemplo persa para + fa_IR e budista para th_TH, mas + gregoriano para en_US). Este último depende da versão da ICU. + Os tipos de calendário disponíveis para uma localidade são listados por + IntlCalendar::getKeywordValuesForLocale. + pattern - - Modelo opcional a ser utilizado ao formatar ou interpretar. + + Modelo opcional a ser utilizado ao formatar ou interpretar. Se fornecido, ele será usado + em vez do formato determinado por dateType e + timeType. Modelos possíveis estão documentados em &url.icu.datepattern;. - + + + Um modelo não contém fuso horário: o horário exibido e o nome mostrado pelas + letras z são aqueles do parâmetro + timezone. + @@ -260,6 +287,45 @@ Primeira saída formatada com modelo é 12/31/1969 Segunda saída formatada com modelo é 12/31/1969 ]]> + + Calendário da localidade e fuso horário com um modelo + +format($timestamp), "\n"; +} + +$formatter = new IntlDateFormatter( + 'en_US', + IntlDateFormatter::FULL, + IntlDateFormatter::FULL, + 'Asia/Singapore', + null, + 'yyyy-MM-dd HH:mm zzzz' +); +echo $formatter->format(gmmktime(21, 0, 0, 6, 1, 2024)), "\n"; +]]> + + &example.outputs; + + + + diff --git a/reference/openssl/functions/openssl-pbkdf2.xml b/reference/openssl/functions/openssl-pbkdf2.xml index afd3d75ec..27cae2fd2 100644 --- a/reference/openssl/functions/openssl-pbkdf2.xml +++ b/reference/openssl/functions/openssl-pbkdf2.xml @@ -1,5 +1,5 @@ - + openssl_pbkdf2 @@ -53,12 +53,10 @@ iterations - + O número de iterações desejadas. - O NIST - recomenda pelo menos 1.000. A partir de 2023, a OWASP recomenda 600.000 iterações para - PBKDF2-HMAC-SHA256 e 210.000 para PBKDF2-HMAC-SHA512. - + A partir de 2026, a OWASP recomenda 600.000 iterações para HMAC-SHA256 e 220.000 para HMAC-SHA512. + From ad7b2a5a7f3ac7521bd170024a4158306b54574f Mon Sep 17 00:00:00 2001 From: leonardolara Date: Tue, 17 Nov 2026 14:52:29 -0300 Subject: [PATCH 2/2] fix rev tag --- language/predefined/sortdirection.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/predefined/sortdirection.xml b/language/predefined/sortdirection.xml index 8ea8c55a0..90f16486c 100644 --- a/language/predefined/sortdirection.xml +++ b/language/predefined/sortdirection.xml @@ -1,4 +1,4 @@ - + A enumeração SortDirection SortDirection