svn: /phpdoc/pt_BR/trunk/appendices/migration74/ deprecated.xml incompatible.xml new-features.xml
[email protected] (Daniel Rodrigues Lima)
| Newsgroups | php.doc.pt-br |
|---|---|
| Message-ID | <[email protected]> |
geekcom Fri, 03 Jan 2020 15:00:18 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=348779
Log:
from wip to ready, minor corrections
Changed paths:
U phpdoc/pt_BR/trunk/appendices/migration74/deprecated.xml
U phpdoc/pt_BR/trunk/appendices/migration74/incompatible.xml
U phpdoc/pt_BR/trunk/appendices/migration74/new-features.xml
svn-diffs-348779.txt
(text/x-diff, 17.1 KB)
Modified: phpdoc/pt_BR/trunk/appendices/migration74/deprecated.xml
===================================================================
--- phpdoc/pt_BR/trunk/appendices/migration74/deprecated.xml 2020-01-03 12:08:27 UTC (rev 348778)
+++ phpdoc/pt_BR/trunk/appendices/migration74/deprecated.xml 2020-01-03 15:00:18 UTC (rev 348779)
@@ -135,7 +135,7 @@
</sect3>
<sect3 xml:id="migration74.deprecated.core.money-format">
- <title>Função<function>money_format</function></title>
+ <title>Função <function>money_format</function></title>
<para>
A função <function>money_format</function> está depreciada.
Modified: phpdoc/pt_BR/trunk/appendices/migration74/incompatible.xml
===================================================================
--- phpdoc/pt_BR/trunk/appendices/migration74/incompatible.xml 2020-01-03 12:08:27 UTC (rev 348778)
+++ phpdoc/pt_BR/trunk/appendices/migration74/incompatible.xml 2020-01-03 15:00:18 UTC (rev 348779)
@@ -27,7 +27,7 @@
</sect3>
<sect3 xml:id="migration74.incompatible.core.fn">
- <title>Palavra-chave<literal>fn</literal></title>
+ <title>Palavra-chave <literal>fn</literal></title>
<para>
<literal>fn</literal> agora é uma palavra-chave reservada. Em particular,
Modified: phpdoc/pt_BR/trunk/appendices/migration74/new-features.xml
===================================================================
--- phpdoc/pt_BR/trunk/appendices/migration74/new-features.xml 2020-01-03 12:08:27 UTC (rev 348778)
+++ phpdoc/pt_BR/trunk/appendices/migration74/new-features.xml 2020-01-03 15:00:18 UTC (rev 348779)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 348037 Maintainer: geekcom Status: wip --><!-- CREDITS: geekcom -->
+<!-- EN-Revision: 348037 Maintainer: geekcom Status: ready --><!-- CREDITS: geekcom -->
<sect1 xml:id="migration74.new-features" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Novos Recursos</title>
@@ -24,9 +24,9 @@
]]>
</programlisting>
</informalexample>
- The above example will enforce that <literal>$user->id</literal> can only be
- assigned <type>integer</type> values and <literal>$user->name</literal> can
- only be assigned <type>string</type> values.
+ O exemplo acima reforçará que <literal>$user->id</literal> pode ser atribuído apenas
+ com valores <type>integer</type> e <literal>$user->name</literal>
+ somente com valores de <type>string</type>.
</para>
</sect3>
@@ -34,8 +34,8 @@
<title>Arrow functions</title>
<para>
- Arrow functions provide a shorthand syntax for defining functions
- with implicit by-value scope binding.
+ Arrow functions fornecem uma sintaxe abreviada para definir funções
+ com ligação implícita por escopo por valor.
<informalexample>
<programlisting role="php">
@@ -52,10 +52,10 @@
</sect3>
<sect3 xml:id="migration74.new-features.core.type-variance">
- <title>Limited return type covariance and argument type contravariance</title>
+ <title>Covariância do tipo de retorno limitado e contravariância do tipo de argumento</title>
<para>
- The following code will now work:
+ O código a seguir agora funcionará:
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -73,14 +73,14 @@
]]>
</programlisting>
</informalexample>
- Full variance support is only available if autoloading is used. Inside a
- single file only non-cyclic type references are possible, because all
- classes need to be available before they are referenced.
+ O suporte completo à variação só está disponível se o carregamento automático for usado. Dentro de
+ um único arquivo, apenas as referências de tipo não cíclico são possíveis, porque todas
+ as classes precisam estar disponíveis antes de serem referenciadas.
</para>
</sect3>
<sect3 xml:id="migration74.new-features.core.null-coalescing-assignment-operator">
- <title>Null coalescing assignment operator</title>
+ <title>Operador de atribuição de coalescência nula</title>
<para>
<informalexample>
@@ -100,7 +100,7 @@
</sect3>
<sect3 xml:id="migration74.new-features.core.unpack-inside-array">
- <title>Unpacking inside arrays</title>
+ <title>Descompactando dentro de arrays</title>
<para>
<informalexample>
@@ -118,10 +118,10 @@
</sect3>
<sect3 xml:id="migration74.new-features.core.numeric-literal-separator">
- <title>Numeric literal separator</title>
+ <title>Separador literal numérico</title>
<para>
- Numeric literals can contain underscores between digits.
+ Literais numéricos podem conter underscores entre dígitos.
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -138,22 +138,22 @@
</sect3>
<sect3 xml:id="migration74.new-features.core.weakreference">
- <title>Weak references</title>
+ <title>Referências fracas</title>
<para>
- Weak references allow the programmer to retain a reference to an object
- that does not prevent the object from being destroyed.
+ Referências fracas permitem que o programador mantenha uma referência a um objeto
+ que não impede que o objeto seja destruído.
</para>
</sect3>
<sect3 xml:id="migration74.new-features.core.tostring-exceptions">
- <title>Allow exceptions from __toString()</title>
+ <title>Permitir exceções de __toString()</title>
<para>
- Throwing exceptions from <link linkend="object.tostring">__toString()</link>
- is now permitted. Previously this resulted in a fatal error. Existing
- recoverable fatal errors in string conversions have been converted to
- <classname>Error</classname> exceptions.
+ Lançar exceções de <link linkend="object.tostring">__toString()</link>
+ agora é permitido. Antes isto resultava um erro fatal. Os erros fatais
+ recuperáveis existentes nas conversões de string foram convertidos
+ em exceções de <classname>Error</classname>.
</para>
</sect3>
@@ -163,8 +163,8 @@
<title>CURL</title>
<para>
- <classname>CURLFile</classname> now supports stream wrappers in addition
- to plain file names, if the extension has been built against libcurl >= 7.56.0.
+ <classname>CURLFile</classname> agora suporta stream wrappers,
+ além de nomes de arquivos simples, se a extensão tiver sido criada com relação à libcurl >= 7.56.0.
</para>
</sect2>
@@ -172,9 +172,9 @@
<title>Filter</title>
<para>
- The <constant>FILTER_VALIDATE_FLOAT</constant> filter now supports the
- <literal>min_range</literal> and <literal>max_range</literal>
- options, with the same semantics as <constant>FILTER_VALIDATE_INT</constant>.
+ O filtro <constant>FILTER_VALIDATE_FLOAT</constant> agora suporta
+ as opções <literal>min_range</literal> e <literal>max_range</literal>
+ com a mesma semântica que <constant>FILTER_VALIDATE_INT</constant>.
</para>
</sect2>
@@ -182,9 +182,9 @@
<title>FFI</title>
<para>
- FFI is a new extension, which provides a simple way to call
- native functions, access native variables, and create/access
- data structures defined in C libraries.
+ FFI é uma nova extensão, que fornece uma maneira simples de chamar
+ funções nativas, acessar variáveis nativas e criar/acessar
+ estruturas de dados definidas nas bibliotecas C.
</para>
</sect2>
@@ -192,8 +192,8 @@
<title>GD</title>
<para>
- Added the <constant>IMG_FILTER_SCATTER</constant> image filter
- to apply a scatter filter to images.
+ Adicionado o filtro de imagem <constant>IMG_FILTER_SCATTER</constant>
+ para aplicar um filtro de dispersão às imagens.
</para>
</sect2>
@@ -201,9 +201,9 @@
<title>Hash</title>
<para>
- Added <literal>crc32c</literal> hash using Castagnoli's polynomial.
- This CRC32 variant is used by storage systems, such as
- iSCSI, SCTP, Btrfs and ext4.
+ Adicionado o hash <literal>crc32c</literal> usando o polinômio de Castagnoli.
+ Essa variante CRC32 é usada por sistemas de armazenamento, como
+ iSCSI, SCTP, Btrfs e ext4.
</para>
</sect2>
@@ -211,9 +211,9 @@
<title>Multibyte String</title>
<para>
- Added the <function>mb_str_split</function> function, which provides
- the same functionality as <function>str_split</function>, but operating
- on code points rather than bytes.
+ Adicionada a função <function>mb_str_split</function>, que fornece
+ a mesma funcionalidade que <function>str_split</function>, mas operando
+ em pontos de código em vez de bytes.
</para>
</sect2>
@@ -221,18 +221,18 @@
<title>OPcache</title>
<para>
- Support for preloading code has been added.
+ Suporte para pré-carregamento de código foi adicionado.
</para>
</sect2>
<sect2 xml:id="migration74.new-features.pcre">
- <title>Regular Expressions (Perl-Compatible)</title>
+ <title>Expressões Regulares (Perl-Compatible)</title>
<para>
- The <function>preg_replace_callback</function> and <function>preg_replace_callback_array</function>
- functions now accept an additional <parameter>flags</parameter> argument, with support for the
- <constant>PREG_OFFSET_CAPTURE</constant> and <constant>PREG_UNMATCHED_AS_NULL</constant> flags.
- This influences the format of the matches array passed to to the callback function.
+ As funções <function>preg_replace_callback</function> e <function>preg_replace_callback_array</function>
+ agora aceitam um argumento <parameter>flags</parameter> adicional, com suporte para as flags
+ <constant>PREG_OFFSET_CAPTURE</constant> e <constant>PREG_UNMATCHED_AS_NULL</constant>.
+ Isso influencia o formato do array de correspondências passado para a função de retorno da chamada.
</para>
</sect2>
@@ -240,16 +240,16 @@
<title>PDO</title>
<para>
- The username and password can now be specified as part of the PDO DSN for
- the mysql, mssql, sybase, dblib, firebird and oci drivers. Previously this
- was only supported by the pgsql driver. If a username/password is specified
- both in the constructor and the DSN, the constructor takes precedence.
+ O nome de usuário e a senha agora podem ser especificados como parte do PDO DSN para
+ os drivers mysql, mssql, sybase, dblib, firebird e oci. Antes, isso
+ era suportado apenas pelo driver pgsql. Se um nome de usuário/senha for especificado
+ no construtor e no DSN, o construtor terá precedência.
</para>
<para>
- It is now possible to escape question marks in SQL queries to avoid them
- being interpreted as parameter placeholders. Writing <literal>??</literal>
- allows sending a single question mark to the database and e.g. use the
- PostgreSQL JSON key exists (<literal>?</literal>) operator.
+ Agora é possível escapar pontos de interrogação nas consultas SQL para evitar que
+ elas sejam interpretadas como espaços reservados para parâmetros. Escrever <literal>??</literal>
+ permite enviar um único ponto de interrogação para o banco de dados e por exemplo, usar o
+ operador PostgreSQL JSON key exists (<literal>?</literal>).
</para>
</sect2>
@@ -257,7 +257,7 @@
<title>PDO_OCI</title>
<para>
- <methodname>PDOStatement::getColumnMeta</methodname> is now available.
+ <methodname>PDOStatement::getColumnMeta</methodname> agora está disponível.
</para>
</sect2>
@@ -266,13 +266,13 @@
<para>
<literal>PDOStatement::getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT)</literal>
- allows checking whether the statement is read-only, i.e. if it doesn't modify
- the database.
+ permite verificar se a instrução é somente leitura, ou seja, se não modifica
+ o banco de dados.
</para>
<para>
<literal>PDO::setAttribute(PDO::SQLITE_ATTR_EXTENDED_RESULT_CODES, true)</literal>
- enables the use of SQLite3 extended result codes in <function>PDO::errorInfo</function>
- and <function>PDOStatement::errorInfo</function>.
+ permite o uso de códigos de resultado estendidos do SQLite3 em <function>PDO::errorInfo</function>
+ e <function>PDOStatement::errorInfo</function>.
</para>
</sect2>
@@ -280,13 +280,13 @@
<title>SQLite3</title>
<para>
- Added <methodname>SQLite3::lastExtendedErrorCode</methodname>
- to fetch the last extended result code.
+ Adicionado <methodname>SQLite3::lastExtendedErrorCode</methodname>
+ para buscar o último código de resultado estendido.
</para>
<para>
- Added <literal>SQLite3::enableExtendedResultCodes($enable = true)</literal>,
- which will make <methodname>SQLite3::lastErrorCode</methodname>
- return extended result codes.
+ Adicionado <literal>SQLite3::enableExtendedResultCodes($enable = true)</literal>,
+ que fará <methodname>SQLite3::lastErrorCode</methodname>
+ retornar códigos de resultado estendidos.
</para>
</sect2>
@@ -294,55 +294,55 @@
<title>Standard</title>
<sect3 xml:id="migration74.new-features.standard.strip-tags">
- <title>strip_tags() with array of tag names</title>
+ <title>strip_tags() com array de nomes de tags</title>
<para>
- <function>strip_tags</function> now also accepts an array of allowed tags:
- instead of <literal>strip_tags($str, '<a><p>')</literal>
- you can now write <literal>strip_tags($str, ['a', 'p'])</literal>.
+ <function>strip_tags</function> agora também aceita um array de tags permitidas:
+ em vez de <literal>strip_tags($str, '<a><p>')</literal>
+ agora você pode escrever <literal>strip_tags($str, ['a', 'p'])</literal>.
</para>
</sect3>
<sect3 xml:id="migration74.new-features.standard.magic-serialize">
- <title>Custom object serialization</title>
+ <title> Serialização de objetos personalizados</title>
<para>
- A new mechanism for custom object serialization has been added, which
- uses two new magic methods: <literal>__serialize</literal>
- and <literal>__unserialize</literal>.
+ Um novo mecanismo para serialização de objetos personalizados foi adicionado,
+ que usa dois novos métodos mágicos: <literal>__serialize</literal>
+ e <literal>__unserialize</literal>.
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
-// Returns array containing all the necessary state of the object.
+// Retorna um array contendo todo o estado necessário do objeto.
public function __serialize(): array;
-// Restores the object state from the given data array.
+// Restaura o estado do objeto a partir do array de dados fornecido.
public function __unserialize(array $data): void;
?>
]]>
</programlisting>
</informalexample>
- The new serialization mechanism supersedes the
- <interfacename>Serializable</interfacename> interface,
- which will be deprecated in the future.
+ O novo mecanismo de serialização substitui a interface
+ <interfacename>Serializable</interfacename>,
+ que será descontinuada no futuro.
</para>
</sect3>
<sect3 xml:id="migration74.new-features.standard.array-merge-no-args">
- <title>Array merge functions without arguments</title>
+ <title>Funções de mesclagem de array sem argumentos</title>
<para>
- <function>array_merge</function> and <function>array_merge_recursive</function>
- may now be called without any arguments, in which case they will return an empty array.
- This is useful in conjunction with the spread operator, e.g. <literal>array_merge(...$arrays)</literal>.
+ <function>array_merge</function> e <function>array_merge_recursive</function>
+ agora podem ser chamados sem nenhum argumento; nesse caso, eles retornarão um array vazio.
+ Isso é útil em conjunto com o operador spread, por exemplo, <literal>array_merge(...$arrays)</literal>.
</para>
</sect3>
<sect3 xml:id="migration74.new-features.standard.proc-open">
- <title><function>proc_open</function> function</title>
+ <title>Função <function>proc_open</function></title>
<para>
- <function>proc_open</function> now accepts an array instead of a
- string for the command. In this case the process will be opened
- directly (without going through a shell) and PHP will take care of
- any necessary argument escaping.
+ <function>proc_open</function> agora aceita um array em vez de
+ uma string para o comando. Nesse caso, o processo será aberto
+ diretamente (sem passar por um shell) e o PHP cuidará de
+ qualquer argumento necessário para escapar.
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -354,8 +354,8 @@
</informalexample>
</para>
<para>
- <function>proc_open</function> now supports
- <literal>redirect</literal> and <literal>null</literal> descriptors.
+ <function>proc_open</function> agora suporta
+ <literal>redirect</literal> e descritores <literal>null</literal>.
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -372,10 +372,10 @@
</sect3>
<sect3 xml:id="migration74.new-features.standard.sodium-argon-hash">
- <title>argon2i(d) without libargon</title>
+ <title>argon2i(d) sem libargon</title>
<para>
- <function>password_hash</function> now has the argon2i and argin2id implementations
- from the sodium extension when PHP is built without libargon.
+ <function>password_hash</function> agora possui as implementações argon2i e argin2id
+ da extensão sodium quando o PHP é compilado sem libargon.
</para>
</sect3>