Skip to content

Commit

Permalink
sync with en rev
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardolara committed Dec 16, 2024
1 parent eccaa88 commit bcef423
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 55 deletions.
20 changes: 17 additions & 3 deletions language-snippets.ent
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: e93feee2870bb551cd11d625271b7f82da3ccb05 Maintainer: leonardolara Status: ready --><!-- CREDITS: adiel, ae, atomotavio, fabioluciano, felipe, klaussilveira, rafaelbernard, leonardolara, fernandowobeto -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: adiel, ae, atomotavio, fabioluciano, felipe, klaussilveira, rafaelbernard, leonardolara, fernandowobeto -->

<!ENTITY installation.enabled.disable 'Esta extensão está habilitada por padrão. Ela pode ser desabilitada usando a seguinte opção em tempo de compilação: '>

Expand Down Expand Up @@ -854,8 +854,10 @@ função.</simpara></warning>'>
<!ENTITY standard.changelog.binary-safe-string-comparison '<row xmlns="http://docbook.org/ns/docbook">
<entry>8.2.0</entry>
<entry>
Esta função agora retorna <literal>-1</literal> ou <literal>1</literal>,
onde anteriormente retornava um número negativo ou positivo.
Não é mais garantido que esta função retornará
<code>strlen($string1) - strlen($string2)</code> quando os comprimentos das strings
não forem iguais, mas ppodem agora retornar <literal>-1</literal> ou
<literal>1</literal> no lugar.
</entry>
</row>
'>
Expand Down Expand Up @@ -4390,6 +4392,18 @@ local: {
</para>
'>

<!ENTITY strings.comparison.return '
<simpara xmlns="http://docbook.org/ns/docbook">
Retorna um valor menor que 0 se <parameter>string1</parameter>
for abaixo de <parameter>string2</parameter>; um valor maior
que 0 se <parameter>string1</parameter> for acima de
<parameter>string2</parameter> e <literal>0</literal> se elas
forem iguais.
Nenhum significado em particular pode ser inferido com confiança desse valor a não
ser o seu sinal.
</simpara>
'>

<!-- filter snippets -->
<!-- TODO: Remove -->
<!ENTITY filter.param.filter '
Expand Down
10 changes: 5 additions & 5 deletions language/types/string.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 887c21f977369af0808290874dc2c279ad4d0af2 Maintainer: ae Status: ready --><!-- CREDITS: felipe,thiago,fabioluciano,rogeriopradoj,geekcom,guimrl,ae,marcosmarcolin,leonardolara -->
<!-- EN-Revision: ef5a00895dbb9a3abbe3edc03d1f966b239a2eb2 Maintainer: ae Status: ready --><!-- CREDITS: felipe,thiago,fabioluciano,rogeriopradoj,geekcom,guimrl,ae,marcosmarcolin,leonardolara -->
<sect1 xml:id="language.types.string">
<title>Strings</title>

Expand Down Expand Up @@ -974,11 +974,11 @@ echo "Funciona: {$obj->values[3]->name}";
echo "Funciona: {$obj->$staticProp}";
// Não funciona, imprime: C:\folder\{fantástico}.txt
echo "C:\folder\{$fantastico}.txt";
// Não funciona, imprime: C:\diretório\{fantástico}.txt
echo "C:\diretório\{$fantastico}.txt";
// Funciona, imprime: C:\folder\fantástico.txt
echo "C:\\folder\\{$fantastico}.txt";
// Funciona, imprime: C:\diretório\fantástico.txt
echo "C:\\diretório\\{$fantastico}.txt";
?>
]]>
</programlisting>
Expand Down
13 changes: 4 additions & 9 deletions reference/strings/functions/strcasecmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a3573c18b89fd32aca1c3924d3fd9568900b4a33 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.strcasecmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>strcasecmp</refname>
Expand Down Expand Up @@ -28,15 +28,15 @@
<term><parameter>string1</parameter></term>
<listitem>
<para>
A primeira string
A primeira string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>string2</parameter></term>
<listitem>
<para>
A segunda string
A segunda string.
</para>
</listitem>
</varlistentry>
Expand All @@ -46,12 +46,7 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna <literal>-1</literal> se <parameter>string1</parameter> for abaixo de
<parameter>string2</parameter>; <literal>1</literal> se <parameter>string1</parameter>
for acima de <parameter>string2</parameter>, e <literal>0</literal> se elas forem
iguais.
</para>
&strings.comparison.return;
</refsect1>

<refsect1 role="changelog">
Expand Down
9 changes: 2 additions & 7 deletions reference/strings/functions/strcmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a3573c18b89fd32aca1c3924d3fd9568900b4a33 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.strcmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>strcmp</refname>
Expand Down Expand Up @@ -44,12 +44,7 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna <literal>-1</literal> se <parameter>string1</parameter> for abaixo de
<parameter>string2</parameter>; <literal>1</literal> se <parameter>string1</parameter>
for acima de <parameter>string2</parameter> e <literal>0</literal> se elas forem
iguais.
</para>
&strings.comparison.return;
</refsect1>

<refsect1 role="changelog">
Expand Down
9 changes: 2 additions & 7 deletions reference/strings/functions/strnatcasecmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a3573c18b89fd32aca1c3924d3fd9568900b4a33 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandoc,leonardolara -->
<refentry xml:id="function.strnatcasecmp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>strnatcasecmp</refname>
Expand Down Expand Up @@ -48,12 +48,7 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Similar a outras funções de comparação de strings, esta retorna <literal>-1</literal> se
<parameter>string1</parameter> representar menos que <parameter>string2</parameter>
<literal>1</literal> se <parameter>string1</parameter> representar mais que
<parameter>string2</parameter>, e <literal>0</literal> se forem iguais.
</para>
&strings.comparison.return;
</refsect1>

<refsect1 role="changelog">
Expand Down
9 changes: 2 additions & 7 deletions reference/strings/functions/strnatcmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a3573c18b89fd32aca1c3924d3fd9568900b4a33 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.strnatcmp">
<refnamediv>
<refname>strnatcmp</refname>
Expand Down Expand Up @@ -47,12 +47,7 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Da mesma forma que outras funções de comparação de strings, esta retorna <literal>-1</literal> se
<parameter>string1</parameter> estiver abaixo de <parameter>string2</parameter>;
<literal>1</literal> se <parameter>string1</parameter> estiver acima de
<parameter>string2</parameter>, e <literal>0</literal> se elas forem iguais.
</para>
&strings.comparison.return;
</refsect1>

<refsect1 role="changelog">
Expand Down
8 changes: 2 additions & 6 deletions reference/strings/functions/strncasecmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a3573c18b89fd32aca1c3924d3fd9568900b4a33 Maintainer: leonardolara Status: ready --><!-- CREDITS: surfmax,felipe,leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: surfmax,felipe,leonardolara -->
<refentry xml:id="function.strncasecmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>strncasecmp</refname>
Expand Down Expand Up @@ -55,11 +55,7 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna <literal>-1</literal> se <parameter>string1</parameter> representa menos que
<parameter>string2</parameter>; <literal>1</literal> se <parameter>string1</parameter> representa
mais que <parameter>string2</parameter>, e <literal>0</literal> se são iguais.
</para>
&strings.comparison.return;
</refsect1>

<refsect1 role="changelog">
Expand Down
9 changes: 2 additions & 7 deletions reference/strings/functions/strncmp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 43cc4ed372bde0a8ee986d57bf522d14099d54a6 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.strncmp" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>strncmp</refname>
Expand Down Expand Up @@ -58,12 +58,7 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna <literal>-1</literal> se <parameter>string1</parameter> estiver abaixo de
<parameter>string2</parameter>; <literal>1</literal> se <parameter>string1</parameter>
estiver acima de <parameter>string2</parameter>, e <literal>0</literal> se elas forem
iguais.
</para>
&strings.comparison.return;
</refsect1>

<refsect1 role="changelog">
Expand Down
6 changes: 2 additions & 4 deletions reference/strings/functions/substr-compare.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a3573c18b89fd32aca1c3924d3fd9568900b4a33 Maintainer: leonardolara Status: ready --><!-- CREDITS: amandavale, felipe, adiel, thiago, leonardolara -->
<!-- EN-Revision: 9b68bf2b63200534e022bc65e800cae6c75abf26 Maintainer: leonardolara Status: ready --><!-- CREDITS: amandavale, felipe, adiel, thiago, leonardolara -->
<refentry xml:id="function.substr-compare" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>substr_compare</refname>
Expand Down Expand Up @@ -78,10 +78,8 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
&strings.comparison.return;
<para>
Retorna <literal>-1</literal> se <parameter>haystack</parameter> a partir da posição
<parameter>offset</parameter> for menor que <parameter>needle</parameter>, <literal>1</literal>
se for marior que <parameter>needle</parameter>, e <literal>0</literal> se forem iguais.
Se <parameter>offset</parameter> for igual a (antes do PHP 7.2.18, 7.3.5) ou
maior que o comprimento de <parameter>haystack</parameter>, ou
<parameter>length</parameter> estiver definido e menor que 0,
Expand Down

0 comments on commit bcef423

Please sign in to comment.