mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
Translation/Update by @lhsazevedo
* Atualiza migration81/constants.xml * Atualiza features/file-upload.xml * Atualiza switch.xml * Atualiza autoload.xml * Atualiza funções de array
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> <!-- EN-Revision: 5530a3afb4b14e340d335f2d81fa0b6858f05e78 Maintainer: @lhsazevedo Status: ready -->
|
||||
<?xml version="1.0" encoding="utf-8"?> <!-- EN-Revision: e251b5cfdb995dfac897b7f9ed9aa8194f8dc50f Maintainer: lhsazevedo Status: ready -->
|
||||
<sect1 xml:id="migration81.constants" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Novas Constantes Globais</title>
|
||||
|
||||
@@ -63,6 +63,19 @@
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration81.constants.pcntl">
|
||||
<title>PCNTL</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara><constant>PRIO_DARWIN_BG</constant></simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><constant>PRIO_DARWIN_THREAD</constant></simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="migration81.constants.posix">
|
||||
<title>POSIX</title>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 92673cc45aefdb6085b332cb381675825926a519 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: Davi Crystal, royopa, diegopires, geekcom, adiel, @lhsazevedo, gsrbr -->
|
||||
<!-- EN-Revision: 9cde24377571d4bea92811c05e6dd766545c1d96 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: Davi Crystal, royopa, diegopires, geekcom, adiel, lhsazevedo, gsrbr -->
|
||||
<chapter xml:id="features.file-upload" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Gerenciar o upload de arquivos</title>
|
||||
|
||||
@@ -394,12 +394,6 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) {
|
||||
Não validar o arquivo que você está operando pode permitir que os usuários acessem
|
||||
informações sensíveis em outros diretórios.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Por favor note que o <productname>CERN httpd</productname> aparenta retirar tudo
|
||||
começando no primeiro espaço do cabeçalho (header) content-type mime
|
||||
recebido do cliente. Se for este o caso, <productname>CERN httpd</productname>
|
||||
não irá suportar o upload de arquivos.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Devido ao grande número de estilos de listagem de diretórios não podemos garantir
|
||||
que arquivos com nomes exóticos (como os que contém espaços) sejam manuseados corretamente.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 9a72097c8b0b95b80e9be1b501656b6aae6fdaa4 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: fabioluciano, geekcom, @lhsazevedo -->
|
||||
<!-- EN-Revision: 225137059b0abb5d6c6284a3ab9b5d643fc5f066 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: fabioluciano, geekcom, lhsazevedo -->
|
||||
|
||||
<sect1 xml:id="control-structures.switch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>switch</title>
|
||||
@@ -29,22 +29,16 @@
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Os dois exemplos a seguir demonstram duas formas diferentes de escrever
|
||||
a mesma coisa, uma usando uma série de declarações <literal>if</literal> e
|
||||
<literal>elseif</literal>, e a outra usando a declaração
|
||||
<literal>switch</literal>:
|
||||
No exemplo a seguir, cada bloco de código é equivalente.
|
||||
Um usa uma série de declarações <literal>if</literal> e
|
||||
<literal>elseif</literal>, e o outra usa uma
|
||||
declaração <literal>switch</literal>. A saída é a mesm a em ambos os casos.
|
||||
<example>
|
||||
<title>Estrutura do <literal>switch</literal></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if ($i == 0) {
|
||||
echo "i é igual a 0";
|
||||
} elseif ($i == 1) {
|
||||
echo "i é igual a 1";
|
||||
} elseif ($i == 2) {
|
||||
echo "i é igual a 2";
|
||||
}
|
||||
// Esta declaração switch:
|
||||
|
||||
switch ($i) {
|
||||
case 0:
|
||||
@@ -57,25 +51,15 @@ switch ($i) {
|
||||
echo "i é igual a 2";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>A estrutura do <literal>switch</literal> permite o uso de <type>string</type>s</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
switch ($i) {
|
||||
case "maçã":
|
||||
echo "i é maçã";
|
||||
break;
|
||||
case "bar":
|
||||
echo "i é bar";
|
||||
break;
|
||||
case "bolo":
|
||||
echo "i é bolo";
|
||||
break;
|
||||
|
||||
// É equivalente a:
|
||||
|
||||
if ($i == 0) {
|
||||
echo "i é igual a 0";
|
||||
} elseif ($i == 1) {
|
||||
echo "i é igual a 1";
|
||||
} elseif ($i == 2) {
|
||||
echo "i é igual a 2";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -181,6 +165,81 @@ switch ($i) {
|
||||
erro <constant>E_COMPILE_ERROR</constant>.
|
||||
</simpara>
|
||||
</note>
|
||||
<note>
|
||||
<simpara>
|
||||
Tecnicamente o caso <literal>default</literal> pode ser listado
|
||||
em qualquer ordem. Ele será usado apenas se nenhum outro caso corresponder.
|
||||
No entando, por conversão, é melhor inseri-lo no fim como a
|
||||
última ramificação.
|
||||
</simpara>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
Se nenhuma ramificação <literal>case</literal> corresponder, e não existe nenhuma ramificação
|
||||
<literal>default</literal>, então nenhum código será executado, assim como se nenhuma declaração <literal>if</literal> fosse verdadeira.
|
||||
</para>
|
||||
<para>
|
||||
Um valor de caso pode ser dado como uma expressão. No entanto, essa expressão será
|
||||
avaliada de forma isolada, e então será frouxamente comparada com o valor do switch. Isso significa que
|
||||
ela não pode ser usada para avaliações complexas do valor do switch. Por exemplo:
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$alvo = 1;
|
||||
$inicio = 3;
|
||||
|
||||
switch ($alvo) {
|
||||
case $inicio - 1:
|
||||
print "A";
|
||||
break;
|
||||
case $inicio - 2:
|
||||
print "B";
|
||||
break;
|
||||
case $inicio - 3:
|
||||
print "C";
|
||||
break;
|
||||
case $inicio - 4:
|
||||
print "D";
|
||||
break;
|
||||
}
|
||||
|
||||
// Imprime "B"
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Para comparações mais complexas, o valor <literal>true</literal> pode ser usado como o valor do switch.
|
||||
Ou, alternativamente, <literal>if</literal>-<literal>else</literal> em vez do <literal>switch</literal>.
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$deslocamento = 1;
|
||||
$inicio = 3;
|
||||
|
||||
switch (true) {
|
||||
case $inicio - $deslocamento === 1:
|
||||
print "A";
|
||||
break;
|
||||
case $inicio - $deslocamento === 2:
|
||||
print "B";
|
||||
break;
|
||||
case $inicio - $deslocamento === 3:
|
||||
print "C";
|
||||
break;
|
||||
case $inicio - $deslocamento === 4:
|
||||
print "D";
|
||||
break;
|
||||
}
|
||||
|
||||
// Imprime "B"
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
A sintaxe alternativa das estruturas de controle é suportada por
|
||||
@@ -218,7 +277,8 @@ endswitch;
|
||||
switch($cerveja)
|
||||
{
|
||||
case 'amstel';
|
||||
case 'stella artois';
|
||||
case 'brahma';
|
||||
case 'stella';
|
||||
case 'heineken';
|
||||
echo 'Boa escolha';
|
||||
break;
|
||||
@@ -231,6 +291,15 @@ switch($cerveja)
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<sect2 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><link linkend="control-structures.match">match</link></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: fca50d321ce57036f3786f278887abe58cd41de8 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: felipe, amandavale, machado, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: ce3a2d381693ccbc10cc4a808c3eb853f3c85c9e Maintainer: lhsazevedo Status: ready --><!-- CREDITS: felipe, amandavale, machado, fabioluciano, lhsazevedo -->
|
||||
<sect1 xml:id="language.oop5.autoload" xmlns="http://docbook.org/ns/docbook">
|
||||
<title>Autoloading Classes</title>
|
||||
<para>
|
||||
@@ -90,6 +90,7 @@ Fatal error: Interface 'ITest' not found in ...
|
||||
<simplelist>
|
||||
<member><function>unserialize</function></member>
|
||||
<member><link linkend="ini.unserialize-callback-func">unserialize_callback_func</link></member>
|
||||
<member><link linkend="ini.unserialize-max-depth">unserialize_max_depth</link></member>
|
||||
<member><function>spl_autoload_register</function></member>
|
||||
<member><function>spl_autoload</function></member>
|
||||
<member><function>__autoload</function></member>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: fd8eb0ea173dac21d2730e54e38ff5fcfdd516ad Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: 2c0d7af2fd69ecd914abec5cfebae53aca8d491f Maintainer: lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-change-key-case" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_change_key_case</refname>
|
||||
@@ -55,14 +55,6 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Dispara <constant>E_WARNING</constant> se <parameter>input</parameter> não
|
||||
for um array.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 86e6094e86b84a51d00ab217ac50ce8dde33d82a Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: 9009f8104bfeb5a22e78987c0a8af05473b3ac45 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-count-values" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_count_values</refname>
|
||||
@@ -14,7 +14,7 @@
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
A função <function>array_count_values</function> retorna um array utilizando os valores
|
||||
do parâmetro <parameter>array</parameter> como chaves e suas respectivas
|
||||
do parâmetro <parameter>array</parameter> (que devem ser &integer;s ou &string;s) como chaves e suas respectivas
|
||||
frequências em <parameter>array</parameter> como valores.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: amandavale, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: 2762980ae4b6b79f5223a5c9f7ff7911c7e8105d Maintainer: lhsazevedo Status: ready --><!-- CREDITS: amandavale, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-diff-assoc" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_diff_assoc</refname>
|
||||
@@ -55,6 +55,25 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&array.changelog.require-only-one;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
@@ -123,7 +142,7 @@ Array
|
||||
(
|
||||
[0] => 0
|
||||
[1] => 1
|
||||
)
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: amandavale, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: c84024092aee02b51dd18b909af0f2ccbdd24f98 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: amandavale, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-diff-key" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_diff_key</refname>
|
||||
@@ -57,6 +57,25 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&array.changelog.require-only-one;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<!--
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: felipe, lucasr, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: c84024092aee02b51dd18b909af0f2ccbdd24f98 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: felipe, lucasr, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-diff" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_diff</refname>
|
||||
@@ -53,6 +53,25 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&array.changelog.require-only-one;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 5fabd07880ab15b0ad2cf7eb055c7c2b36d7120f Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: amandavale, lucasr, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: ce882c196dce81bf6bd4d94af4fa4110ddc49ef4 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: amandavale, lucasr, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-fill" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_fill</refname>
|
||||
@@ -37,7 +37,8 @@
|
||||
Se <parameter>start_index</parameter> for negativo,
|
||||
o primeiro índice do array retornado será
|
||||
<parameter>start_index</parameter>, e os índices
|
||||
seguintes começarão do zero
|
||||
seguintes começarão do zero antes do PHP 8.0.0.
|
||||
A partir do PHP 8.0.0, chaves negativas são incrementadas normalmente
|
||||
(veja o <link linkend="function.array-fill.example.basic">exemplo</link>).
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -48,7 +49,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Número de elementos a inserir.
|
||||
Deve ser maior ou igual a zero.
|
||||
Deve ser maior ou igual a zero, e menor ou igual a <literal>2147483647</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -76,11 +77,35 @@
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Dispara um <constant>E_WARNING</constant> se <parameter>count</parameter> é
|
||||
menor que um.
|
||||
Lança um <classname>ValueError</classname> se <parameter>count</parameter> estiver
|
||||
fora do alcance.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<function>array_fill</function> agora lança um <classname>ValueError</classname>
|
||||
se <parameter>count</parameter> estiver fora de alance; anteriormente um <constant>E_WARNING</constant>
|
||||
era disparado, e a função retornava &false;.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
@@ -90,9 +115,7 @@
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = array_fill(5, 6, 'banana');
|
||||
$b = array_fill(-2, 4, 'pera');
|
||||
print_r($a);
|
||||
print_r($b);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -108,6 +131,24 @@ Array
|
||||
[9] => banana
|
||||
[10] => banana
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example xml:id="function.array-fill.example.negative-start-index">
|
||||
<title>Exemplo da <function>array_fill</function> com um índice de início negativo</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$a = array_fill(-2, 4, 'pera');
|
||||
print_r($a);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.7;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[-2] => pera
|
||||
@@ -115,10 +156,25 @@ Array
|
||||
[1] => pera
|
||||
[2] => pera
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
&example.outputs.8;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[-2] => pera
|
||||
[-1] => pera
|
||||
[0] => pera
|
||||
[1] => pera
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Note que o índice <literal>-1</literal> não está presente antes do PHP 8.0.0.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: felipe, fabioluciano, matheusmmo, @lhsazevedo -->
|
||||
<!-- EN-Revision: c84024092aee02b51dd18b909af0f2ccbdd24f98 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: felipe, fabioluciano, matheusmmo, lhsazevedo -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-intersect-assoc">
|
||||
<refnamediv>
|
||||
<refname>array_intersect_assoc</refname>
|
||||
@@ -53,6 +53,25 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&array.changelog.require-only-one;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: felipe, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: c84024092aee02b51dd18b909af0f2ccbdd24f98 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: felipe, fabioluciano, lhsazevedo -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.array-intersect-key">
|
||||
<refnamediv>
|
||||
<refname>array_intersect_key</refname>
|
||||
@@ -53,6 +53,25 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&array.changelog.require-only-one;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: felipe, narigone, lucasr, fabioluciano, @lhsazevedo -->
|
||||
<!-- EN-Revision: c84024092aee02b51dd18b909af0f2ccbdd24f98 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: felipe, narigone, lucasr, fabioluciano, lhsazevedo -->
|
||||
<refentry xml:id="function.array-intersect" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_intersect</refname>
|
||||
@@ -53,6 +53,25 @@
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&array.changelog.require-only-one;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready--><!-- CREDITS: amandavale, rafaelbernard, amandavale, @lhsazevedo -->
|
||||
<!-- EN-Revision: 7bbd1aac4da7cc6098d187da0139dd24a10f90f3 Maintainer: lhsazevedo Status: ready--><!-- CREDITS: amandavale, rafaelbernard, amandavale, lhsazevedo -->
|
||||
<refentry xml:id="function.array-udiff-assoc" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_udiff_assoc</refname>
|
||||
@@ -81,7 +81,7 @@
|
||||
<?php
|
||||
class cr {
|
||||
private $priv_member;
|
||||
function cr($val)
|
||||
function __construct($val)
|
||||
{
|
||||
$this->priv_member = $val;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 9e0f03ac354d797d1d16c0fcc1663e5e170f2727 Maintainer: @lhsazevedo Status: ready--><!-- CREDITS: amandavale, rafaelbernard, @lhsazevedo -->
|
||||
<!-- EN-Revision: 529b4f98787ecff49d129ffd95b12effdfd7b5f0 Maintainer: lhsazevedo Status: ready--><!-- CREDITS: amandavale, rafaelbernard, lhsazevedo -->
|
||||
<refentry xml:id="function.array-udiff-uassoc" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>array_udiff_uassoc</refname>
|
||||
@@ -84,7 +84,7 @@
|
||||
<?php
|
||||
class cr {
|
||||
private $priv_member;
|
||||
function cr($val)
|
||||
function __construct($val)
|
||||
{
|
||||
$this->priv_member = $val;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- EN-Revision: 68a9c82e06906a5c00e0199307d87dd3739f719b Maintainer: @lhsazevedo Status: ready --><!-- CREDITS: narigone, lucasr, felipe, @lhsazevedo -->
|
||||
<!-- EN-Revision: 8cd7c0d8c574903e149c1da0689a8728cdf909d4 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: narigone, lucasr, felipe, lhsazevedo -->
|
||||
<refentry xml:id="function.in-array" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>in_array</refname>
|
||||
@@ -53,6 +53,14 @@
|
||||
linkend="language.types">tipos</link> de <parameter>needle</parameter> em
|
||||
<parameter>haystack</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Antes do PHP 8.0.0, uma <parameter>needle</parameter> <literal>string</literal> irá corresponder a um valor
|
||||
de <literal>0</literal> no array em modo não estrito, e vice-versa. Isso pode levar a resultados
|
||||
indesejáveis. Casos extremos similares exitem para outros tipos, também. Se você não tem certeza absoluta dos
|
||||
tipos dos valores involvidos, sempre use a flag <parameter>strict</parameter> para evitar comportamento inesperado.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
@@ -152,6 +160,7 @@ if (in_array('o', $a)) {
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
||||
Reference in New Issue
Block a user