Skip to content

Instantly share code, notes, and snippets.

@royopa
Created December 25, 2014 22:22
Show Gist options
  • Save royopa/c542b6c47d6d494ea6d5 to your computer and use it in GitHub Desktop.
Save royopa/c542b6c47d6d494ea6d5 to your computer and use it in GitHub Desktop.
Patch pt_BR/appendices/migration52.xml
Index: migration52.xml
===================================================================
--- migration52.xml (revision 335367)
+++ migration52.xml (working copy)
@@ -1,73 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision$ -->
+<!-- EN-Revision: 335367 Maintainer: none Status: ready -->
+<!-- CREDITS: gabriel@taller.net.br, revagomes@gmail.com, __royopa, sebas@taller.net.br -->
<appendix xml:id="migration52" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
- <title>Migrating from PHP 5.1.x to PHP 5.2.x</title>
+ <title>Migrando do PHP 5.1.x para o PHP 5.2.x</title>
<para>
&manual.migration.seealso;
- <link linkend="migration5">5.0.x</link>,
- <link linkend="migration51">5.1.x</link> and
+ <link linkend="migration5">5.0.x</link>,
+ <link linkend="migration51">5.1.x</link> e
<link linkend="migration53">5.3.x</link>.
</para>
<section xml:id="migration52.changes">
- <title>What has changed in PHP 5.2.x</title>
+ <title>O que mudou no PHP 5.2.x</title>
<para>
- Most improvements in PHP 5.2.x have no impact on existing code. There are
- a <link linkend="migration52.incompatible">few incompatibilities</link>
- and <link linkend="migration52.error-messages">new error messages</link>
- that should be considered, and code should be tested before switching PHP
- versions in production environments.
+ Muitas melhorias no PHP 5.2.x não tem impacto em códigos existentes. Há
+ <link linkend="migration52.incompatible">poucas incompatibilidades</link>
+ e <link linkend="migration52.error-messages">novas mensagens de erro</link>
+ que devem ser consideradas. O código deve ser testado antes da atualização
+ de versão do PHP em ambientes de produção.
</para>
<para>
- If the system is being upgraded from PHP 5.0.x, the manual section titled
- <link linkend="migration51">Upgrade Notes for PHP 5.1.x</link>
- should also be read.
+ Se o sistema está sendo atualizado do PHP 5.0.x, a seção do manual entitulada
+ <link linkend="migration51">Notas de atualização para o PHP 5.1.x</link>
+ também deve ser lida.
</para>
<para>
- Similarly, if the system is being upgraded from PHP 4, the manual section
- titled <link linkend="migration5">Migrating from PHP 4 to PHP 5</link>
- should be read as well.
+ Igualmente, se o sistema está sendo atualizado do PHP 4, a seção do manual
+ entitulada <link linkend="migration5">Migrando do PHP 4 para o PHP 5</link>
+ também deve ser lida.
</para>
</section>
<section xml:id="migration52.incompatible">
- <title>Backward Incompatible Changes</title>
+ <title>Mudanças de compatibilidade com versões anteriores.</title>
<para>
- Although most existing PHP 5 code should work without changes, you should
- pay attention to the following backward incompatible changes:
+ Embora muitos códigos existentes em PHP 5 funcionarem sem mudanças,
+ você deve ter atenção nas seguintes mudanças de compatibilidade:
</para>
<itemizedlist>
<listitem>
<simpara>
- <function>getrusage</function> returns &null; when passed
- incompatible arguments as of PHP 5.2.1.
+ <function>getrusage</function> retorna &null; quando argumentos
+ incompatíveis são passados, como no PHP 5.2.1.
</simpara>
</listitem>
<listitem>
<simpara>
<function>ZipArchive::setCommentName</function>
- returns &true; on success as of PHP 5.2.1.
+ retorna &true; em caso de sucesso, como no PHP 5.2.1.
</simpara>
</listitem>
<listitem>
<simpara>
<function>ZipArchive::setCommentIndex</function>
- returns &true; on success as of PHP 5.2.1.
+ retorna &true; em caso de sucesso, como no PHP 5.2.1.
</simpara>
</listitem>
<listitem>
<simpara>
- <function>SplFileObject::getFilename</function> returns
- the filename, not relative/path/to/file, as of PHP 5.2.1.
+ <function>SplFileObject::getFilename</function> retorna
+ o nome do arquivo, com o caminho absoluto, como no PHP 5.2.1.
</simpara>
</listitem>
<listitem>
<simpara>
- Changed priority of <varname>PHPRC</varname> environment variable on Win32
+ Muda a prioridade da variável de ambiente <varname>PHPRC</varname> em Win32
</simpara>
<simpara>
- The <varname>PHPRC</varname> environment variable now takes priority over the path stored
- in the Windows registry.
+ A variável de ambiente <varname>PHPRC</varname> agora tem prioridade sob o
+ caminho armazenado nos registros do Windows.
</simpara>
</listitem>
<listitem>
@@ -75,24 +76,23 @@
CLI SAPI no longer checks cwd for &php.ini; or the <filename>php-cli.ini</filename> file
</simpara>
<simpara>
- In PHP 5.1.x an undocumented feature was added that made the CLI binary check
- the current working directory for a PHP configuration file, potentially
- leading to unpredictable behavior if an unexpected configuration file were
- read. This functionality was removed in 5.2.0, and PHP will no longer search
- CWD for the presence of &php.ini; or <filename>php-cli.ini</filename> files.
- See also the <link linkend="features.commandline">command line</link> section
- of the manual.
+ No PHP 5.1.x uma funcionalidade não documentada foi adicionada fazendo com que o
+ binário verificasse o diretório atual para carregar o arquivo de configuração do PHP,
+ gerando comportamentos imprevisíveis se um arquivo de configuração não esperado
+ for carregado. Esta funcionalidade foi removida na versão 5.2.0, então o PHP não verifica
+ mais a presença dos arquivos &php.ini; ou <filename>php-cli.ini</filename>.
+ Veja também a seção <link linkend="features.commandline">linha de comando</link> no manual.
</simpara>
</listitem>
<listitem>
<simpara>
- Added a warning when performing modulus 0 operations
+ Adicionado um aviso quando forem executadas operações de módulo 0
</simpara>
<simpara>
- In earlier versions of PHP, performing integer % 0 did not emit any
- warning messages, instead returning an unexpected return value of &false;.
- As of PHP 5.2.0, this operation will emit an <constant>E_WARNING</constant>,
- as is the case in all other instances where division by zero is performed.
+ Em versões anteriores do PHP, ao executar uma operação de módulo 0 (% 0) com um inteiro
+ não se emitia nenhuma mensagem de alerta, retornando um valor &false; inesperado.
+ No PHP 5.2.0, esta operação emitirá <constant>E_WARNING</constant>, como em todos
+ os casos ao realizar divisões por zero.
</simpara>
<informalexample>
<programlisting role="php">
@@ -99,7 +99,7 @@
<![CDATA[
<?php
print 10 % 0;
-/* Warning: Division by zero in filename on line n */
+/* Warning: Division by zero in filename on line n */
?>
]]>
</programlisting>
@@ -107,22 +107,19 @@
</listitem>
<listitem>
<simpara>
- Changed <link linkend="object.tostring">__toString()</link> to be called wherever
- applicable.
+ O <link linkend="object.tostring">__toString()</link> foi alterado para que possa ser
+ chamado onde for aplicável.
</simpara>
<simpara>
- The magic method <link linkend="object.tostring">__toString()</link> will now be called
- in a string context, that is, anywhere an object is used as a
- string.
+ O método mágico <link linkend="object.tostring">__toString()</link> agora será chamado
+ em contexto de string, ou seja, em qualquer objeto que seja utilizado como string.
</simpara>
<simpara>
- The fallback of returning a string that contains the
- object identifier was dropped in PHP 5.2.0. It became
- problematic because an object identifier cannot be considered
- unique. This change will mean that your application is flawed if you
- have relied on the object identifier as a return value. An attempt
- to use that value as a string will now result in a catchable fatal
- error.
+ O fallback que retornava uma string contendo o identificador do objeto foi removido no
+ PHP 5.2.0. Isto começou a ser um problema por que o identificado do objeto naão poderia
+ ser considerado único. Esta mudança significa que se sua aplicação está esperando
+ este comportamento, a mesma pode falhar. Na tentativa de utilizar o valor retornado
+ quando o método não for aplicável, agora resultará em um erro tratável.
</simpara>
<informalexample>
<programlisting role="php">
@@ -138,15 +135,14 @@
</programlisting>
</informalexample>
<simpara>
- Even with <link linkend="object.tostring">__toString()</link>, objects cannot be used as
- array indices or keys. We may add built-in hash support for this at
- a later date, but as of PHP 5.2.x you will need to either provide your
- own hashing or use the new SPL function
- <function>spl_object_hash</function>.
+ Até com <link linkend="object.tostring">__toString()</link>, objetos não podem
+ ser utilizados como indices ou chaves de um array. Posteriormente nós devemos adicionar
+ uma funcionalidade embutida que dé suporte a isto, mas na versão 5.2.x você terá que
+ fornecer seu próprio hashing ou a nova função do SPL <function>spl_object_hash</function>.
</simpara>
<simpara>
- Exceptions can not be thrown from
- <link linkend="object.tostring">__toString()</link> methods.
+ Excessões não podem lançadas dentro do
+ <link linkend="object.tostring">__toString()</link>.
</simpara>
<informalexample>
<programlisting role="php">
@@ -170,11 +166,11 @@
</listitem>
<listitem>
<simpara>
- Dropped abstract static class functions.
+ Funções de classes abstratas e estáticas foram removidas.
</simpara>
<simpara>
- Due to an oversight, PHP 5.0.x and 5.1.x allowed abstract static
- functions in classes. As of PHP 5.2.x, only interfaces can have them.
+ Devido a um descuido nas versões 5.0.x e 5.1.x do PHP, foi permitido funções estáticas
+ abstratas em classes. A partir do PHP 5.2.x, apenas as interfaces podem tê-las.
</simpara>
<informalexample>
<programlisting role="php">
@@ -192,24 +188,19 @@
</listitem>
<listitem>
<simpara>
- <link linkend="ref.oci8">Oracle extension</link> requires at least Oracle
- 10 on Windows.
+ A <link linkend="ref.oci8">Extensão Oracle</link> requer, pelo menos, o Oracle
+      10 no Windows.
</simpara>
</listitem>
<listitem>
<simpara>
- Added RFC2397 (<literal>data:</literal> stream) support.
+ Adicionado suporte RFC2397 (<literal>data:</literal> stream).
</simpara>
<simpara>
- The introduction of the 'data' URL scheme has the potential to lead to a
- change of behavior under Windows. If you are working with a <acronym>NTFS</acronym>
- file system and making use of meta streams in your application, and if you
- just happen to be using a file with the name 'data:' that is accessed without
- any path information - it won't work any more. The fix is to use the 'file:'
- protocol when accessing it.
+ A introdução do esquema de URL de dados podem levar uma mudança de comportamento no Windows. Se você estiver usando o sistema de arquivos <acronym>NTFS</acronym> e usar meta streams em sua aplicação, e se ocorrer de você usar um arquivo com o nome 'data:' ele será acessado sem o seu caminho - e não funcionará mais. Para corrigir isso use o protocolo 'file:' quando for acessá-lo.
</simpara>
<simpara>
- See also <link xlink:href="&url.rfc;2397">RFC 2397</link>
+ Veja também <link xlink:href="&url.rfc;2397">RFC 2397</link>
</simpara>
<informalexample>
<programlisting role="php">
@@ -226,13 +217,10 @@
</listitem>
<listitem>
<simpara>
- Regression in <literal>glob()</literal> patterns
+ Regresssão no padrão <literal>glob()</literal>
</simpara>
<simpara>
- In version 5.2.4 a security fix caused a regression for patterns of
- the form "/foo/*/bar/*". Since version 5.2.5 instead of raising a warning the
- <literal>glob()</literal> function will return &false; when
- <literal>openbase_dir</literal> restrictions are violated.
+ Na versão 5.2.4 uma correção de segurança causava uma regressão para os padrões do formulário "/foo/*/bar/*". Desde a versão 5.2.5 ao invés de exibir um warning a função <literal>glob()</literal> retornará &false; quando as restrições <literal>openbase_dir</literal> forem violadas.
</simpara>
</listitem>
</itemizedlist>
@@ -239,14 +227,14 @@
</section>
<section xml:id="migration52.error-messages">
- <title>New Error Messages</title>
+ <title>Novas mensagens de erro</title>
<para>
- Below are the new error messages that have not been discussed
- elsewhere in this document.
+ A seguir estão descritas as novas mensagens de erro que não foram discutidas em
+ outras partes desse documento.
</para>
<para>
<example>
- <title>In PHP Core</title>
+ <title>No Core do PHP</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -278,7 +266,7 @@
</para>
<para>
<example>
- <title><link linkend="language.oop5">Object Oriented Code</link> in PHP Core</title>
+ <title><link linkend="language.oop5">Código orientado a objetos</link> no Core do PHP</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -352,7 +340,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.bzip2">bzip2</link> Extension</title>
+ <title>Na extensão <link linkend="ref.bzip2">bzip2</link></title>
<programlisting role="php">
<![CDATA[
<?php
@@ -376,7 +364,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.datetime">datetime</link> Extension</title>
+ <title>Na extensão <link linkend="ref.datetime">datetime</link></title>
<programlisting role="php">
<![CDATA[
<?php
@@ -396,7 +384,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.dbase">dBase</link> Extension</title>
+ <title>Na extensão <link linkend="ref.dbase">dBase</link></title>
<programlisting role="php">
<![CDATA[
<?php
@@ -413,7 +401,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.mcrypt">mcrypt</link> Extension</title>
+ <title>Na extensão <link linkend="ref.mcrypt">mcrypt</link></title>
<programlisting role="php">
<![CDATA[
<?php
@@ -432,7 +420,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.oci8">oci8</link> Extension</title>
+ <title>Na extensão <link linkend="ref.oci8">oci8</link></title>
<programlisting role="php">
<![CDATA[
<?php
@@ -459,7 +447,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.spl">SPL</link> Extension</title>
+ <title>Na extensão <link linkend="ref.spl">SPL</link></title>
<programlisting role="php">
<![CDATA[
<?php
@@ -478,7 +466,7 @@
</para>
<para>
<example>
- <title>In the <link linkend="ref.sem">Semaphore</link> (sysvmsg) extension</title>
+ <title>Na extensão <link linkend="ref.sem">Semaphore</link> (sysvmsg)</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -491,7 +479,7 @@
</para>
<para>
<example>
- <title>A 5.2.1+ <link linkend="ref.zip">Zip</link> Example</title>
+ <title>Um exemplo de <link linkend="ref.zip">Zip</link> no PHP 5.2.1+</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -513,99 +501,98 @@
</section>
<section xml:id="migration52.datetime">
- <title>Changes in PHP <link linkend="ref.datetime">datetime</link>
- support</title>
+ <title>Mudanças no suporte a <link linkend="ref.datetime">datetime</link> no PHP</title>
<para>
+ Desde o PHP 5.1.0, existia uma extensão chamada <literal>date</literal> no Core do PHP.
+ Essa é a nova implementação do suporte a datetime no PHP.
+
Since PHP 5.1.0, there has been an extension named <literal>date</literal>
in the PHP core. This is the new implementation of PHP's datetime support.
- Although it will attempt to guess your system's timezone setting, you
- should set the timezone manually. You can do this in any of three ways:
+ Embora a linguagem tentará adivinhar a timezone de seu sistema, você deverá
+ definir a timezone manualmente. Voce pode fazer isso de uma das três formas:
</para>
<itemizedlist>
<listitem>
<simpara>
- in your &php.ini; using the
- <link linkend="ini.date.timezone">date.timezone</link> INI directive
+ em seu &php.ini; usando a diretiva <link linkend="ini.date.timezone">date.timezone</link>
</simpara>
</listitem>
<listitem>
<simpara>
- on your system using the <varname>TZ</varname> environmental variable
+ no seu sistema usando a variável de ambiente <varname>TZ</varname>
</simpara>
</listitem>
<listitem>
<simpara>
- from your script using the convenience function
- <function>date_default_timezone_set</function>
+ no seu script usando a função <function>date_default_timezone_set</function>
</simpara>
</listitem>
</itemizedlist>
<para>
- All supported <link linkend="timezones">timezones</link> are listed
- in the PHP Manual.
+ Todas as <link linkend="timezones">timezones</link> suportadas são listadas no Manual do PHP.
</para>
<para>
- With the advent of PHP 5.2.x, there are <type>object</type> representations of the
- date and timezone, named <literal>DateTime</literal> and <literal>DateTimeZone</literal> respectively.
- The methods map to existing procedural date functions.
+ Com o advento do PHP 5.2.x, existem representações de <type>objetos</type> de data e timezone,
+ chamados <literal>DateTime</literal> e <literal>DateTimeZone</literal> respectivamente.
+ Os métodos mapeiam as funções procedurais de data já existentes.
</para>
</section>
<section xml:id="migration52.parameters">
- <title>New Parameters</title>
+ <title>Novos parâmetros</title>
<para>
- Some functions were given new, optional, parameters in PHP 5.2.x:
+ Algumas funções ganharam parâmetros opcionais novos no PHP 5.2.x:
</para>
- <para>PHP Core:</para>
+ <para>Core do PHP:</para>
<itemizedlist>
<listitem>
<simpara>
<function>htmlentities</function>
- - added <parameter>double_encode</parameter> in PHP 5.2.3.
+ - adicionado <parameter>double_encode</parameter> no PHP 5.2.3.
</simpara>
</listitem>
<listitem>
<simpara>
<function>htmlspecialchars</function>
- - added <parameter>double_encode</parameter> in PHP 5.2.3.
+ - adicionado <parameter>double_encode</parameter> no PHP 5.2.3.
</simpara>
</listitem>
<listitem>
<simpara>
<function>base64_decode</function>
- - added <parameter>strict</parameter>
+ - adicionado <parameter>strict</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>setcookie</function>
- - added <parameter>httponly</parameter>
+ - adicionado <parameter>httponly</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>setrawcookie</function>
- - added <parameter>httponly</parameter>
+ - adicionado <parameter>httponly</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>session_set_cookie_params</function>
- - added <parameter>httponly</parameter>
+ - adicionado <parameter>httponly</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>memory_get_usage</function>
- - added <parameter>real_usage</parameter>
+ - adicionado <parameter>real_usage</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>get_loaded_extensions</function>
- - added <parameter>zend_extensions</parameter> in PHP 5.2.4
+ - adicionado <parameter>zend_extensions</parameter> no PHP 5.2.4
</simpara>
</listitem>
</itemizedlist>
@@ -615,7 +602,7 @@
<listitem>
<simpara>
<function>curl_multi_info_read</function>
- - added <parameter>msgs_in_queue</parameter>
+ - adicionado <parameter>msgs_in_queue</parameter>
</simpara>
</listitem>
</itemizedlist>
@@ -625,7 +612,7 @@
<listitem>
<simpara>
<function>date</function>
- - added "u" (milliseconds) format character in PHP 5.2.2
+ - adicionado o caracterer de formatação "u" (millisegundos) no PHP 5.2.2
</simpara>
</listitem>
</itemizedlist>
@@ -635,13 +622,13 @@
<listitem>
<simpara>
<function>imap_open</function>
- - added <parameter>n_retries</parameter>
+ - adicionado <parameter>n_retries</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>imap_reopen</function>
- - added <parameter>n_retries</parameter>
+ - adicionado <parameter>n_retries</parameter>
</simpara>
</listitem>
</itemizedlist>
@@ -651,16 +638,15 @@
<listitem>
<simpara>
<function>mb_strrpos</function>
- - added <parameter>offset</parameter>
+ - adicionado <parameter>offset</parameter>
</simpara>
<warning>
<simpara>
- The <parameter>offset</parameter> parameter was put in the position
- the <parameter>encoding</parameter> parameter used to be.
- Backward compatibility has been
- provided by allowing <parameter>encoding</parameter> to be specified
- as the third parameter. Using this backward compatibility mode is
- not recommended because it will be removed in a future release of PHP.
+ O parãmetro <parameter>offset</parameter> foi colocado na posição onde parâmetro
+ <parameter>encoding</parameter> estava.
+ A compatibilidade com versões anteriores foi disponibilizada permitindo que o
+ <parameter>encoding</parameter> seja especificado como terceiro parâmetro. Usar
+ esse modo não é recomendado pois ele será removido em uma versão futura do PHP.
</simpara>
</warning>
</listitem>
@@ -671,7 +657,7 @@
<listitem>
<simpara>
<function>SWFMovie::streamMP3</function>
- - added <parameter>skip</parameter> in PHP 5.2.1
+ - adicionado <parameter>skip</parameter> no PHP 5.2.1
</simpara>
</listitem>
</itemizedlist>
@@ -681,7 +667,7 @@
<listitem>
<simpara>
<function>openssl_verify</function>
- - added <parameter>signature_algo</parameter>
+ - adicionado <parameter>signature_algo</parameter>
</simpara>
</listitem>
</itemizedlist>
@@ -691,13 +677,13 @@
<listitem>
<simpara>
<function>pg_escape_bytea</function>
- - added <parameter>connection</parameter>
+ - adicionado <parameter>connection</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>pg_escape_string</function>
- - added <parameter>connection</parameter>
+ - adicionado <parameter>connection</parameter>
</simpara>
</listitem>
</itemizedlist>
@@ -707,31 +693,31 @@
<listitem>
<simpara>
<function>SimpleXMLElement::__construct</function>
- - added <parameter>is_prefix</parameter>
+ - adicionado <parameter>is_prefix</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>SimpleXMLElement::attributes</function>
- - added <parameter>is_prefix</parameter>
+ - adicionado <parameter>is_prefix</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>SimpleXMLElement::children</function>
- - added <parameter>is_prefix</parameter>
+ - adicionado <parameter>is_prefix</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>simplexml_load_file</function>
- - added <parameter>is_prefix</parameter>
+ - adicionado <parameter>is_prefix</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>simplexml_load_string</function>
- - added <parameter>is_prefix</parameter>
+ - adicionado <parameter>is_prefix</parameter>
</simpara>
</listitem>
</itemizedlist>
@@ -741,7 +727,7 @@
<listitem>
<simpara>
array iterator_to_array(Traversable it [, bool use_keys = true])
- - added <parameter>use_keys</parameter> in PHP 5.2.1
+ - adicionado <parameter>use_keys</parameter> in PHP 5.2.1
</simpara>
</listitem>
</itemizedlist>
@@ -751,15 +737,15 @@
<listitem>
<simpara>
<function>XMLReader::open</function>
- - added <parameter>encoding</parameter>
- and <parameter>options</parameter>
+ - adicionado <parameter>encoding</parameter>
+ e <parameter>options</parameter>
</simpara>
</listitem>
<listitem>
<simpara>
<function>XMLReader::XML</function>
- - added <parameter>encoding</parameter>
- and <parameter>options</parameter>
+ - adicionado <parameter>encoding</parameter>
+ e <parameter>options</parameter>
</simpara>
</listitem>
</itemizedlist>
@@ -769,13 +755,13 @@
<listitem>
<simpara>
<function>xmlwriter_write_element</function>
- - the <parameter>content</parameter> became optional in PHP 5.2.3
+ - o parâmetro <parameter>content</parameter> tornou-se opcional no PHP 5.2.3
</simpara>
</listitem>
<listitem>
<simpara>
<function>xmlwriter_write_element_ns</function>
- - the <parameter>content</parameter> became optional in PHP 5.2.3
+ - o parâmetro <parameter>content</parameter> tornou-se opcional no PHP 5.2.3
</simpara>
</listitem>
</itemizedlist>
@@ -782,31 +768,31 @@
</section>
<section xml:id="migration52.functions">
- <title>New Functions</title>
+ <title>Novas Funções</title>
<para>
- PHP 5.2.x introduced some new functions:
+ O PHP 5.2.x introduziu algumas novas funções:
</para>
- <para>PHP Core:</para>
+ <para>No Core do PHP:</para>
<itemizedlist>
<listitem>
<simpara>
<function>array_fill_keys</function>
- - Create an array using the elements of the first parameter as keys,
- each initialized to <literal>val</literal>
+ - Cria um array usando os elementos do primeiro parâmetro como chave,
+ cada um inicializado com <literal>val</literal>.
</simpara>
</listitem>
<listitem>
<simpara>
<function>error_get_last</function>
- - Get the last occurred error as associative array. Returns &null;
- if there hasn't been an error yet
+ - Obtém o último erro ocorrido como um array associativo. Retorna &null;
+ se ainda não houve um erro
</simpara>
</listitem>
<listitem>
<simpara>
<function>image_type_to_extension</function>
- - Get file extension for image-type returned by
+ - Obtém a extensão do arquivo para o tipo de imagem retornado pelas funções
<function>getimagesize</function>, <function>exif_read_data</function>,
<function>exif_thumbnail</function>, <function>exif_imagetype</function>
</simpara>
@@ -814,38 +800,38 @@
<listitem>
<simpara>
<function>memory_get_peak_usage</function>
- - Returns the peak allocated by PHP memory
+ - Retorna o pico da quantidade de memória alocada pelo PHP
</simpara>
</listitem>
<listitem>
<simpara>
<function>sys_get_temp_dir</function>
- - Returns directory path used for temporary files. (Added in 5.2.1)
+ - Retorna o caminho do diretório usado para arquivos temporários. (Adicionado no PHP 5.2.1)
</simpara>
</listitem>
<listitem>
<simpara>
<function>timezone_abbreviations_list</function>
- - Returns associative array containing DST, offset and the timezone name
+ - Retorna um array associativo contendo DST, offset e o nome do timezone
</simpara>
</listitem>
<listitem>
<simpara>
<function>timezone_identifiers_list</function>
- - Returns numerically indexed array with all timezone identifiers
+ - Retorna um array indexado numericamente com todos os identificadores de timezone
</simpara>
</listitem>
<listitem>
<simpara>
<function>timezone_name_from_abbr</function>
- - Returns the timezone name from abbreviation
+ - Retorna o nome do timezone a partir de sua abreviatura
</simpara>
</listitem>
<listitem>
<simpara>
<function>stream_socket_shutdown</function>
- - Causes all or part of a full-duplex connection on the socket
- associated with stream to be shut down. As of PHP 5.2.1.
+ - Faz com que toda ou parte de uma conexão full-duplex no socket
+ associado com a stream seja encerrado. Disponível a partir do PHP 5.2.1.
</simpara>
</listitem>
</itemizedlist>
@@ -855,13 +841,13 @@
<listitem>
<simpara>
<function>imagegrabscreen</function>
- - Grabs a screenshot of the whole screen. As of PHP 5.2.2.
+ - Gera um screenshot da tela inteira. Disponível a partir do PHP 5.2.2.
</simpara>
</listitem>
<listitem>
<simpara>
<function>imagegrabwindow</function>
- - Captures a window. As of PHP 5.2.2.
+ - Captura uma janela. Disponível a partir do PHP 5.2.2.
</simpara>
</listitem>
</itemizedlist>
@@ -871,7 +857,7 @@
<listitem>
<simpara>
<function>libxml_disable_entity_loader</function>
- - Disable the ability to load external entities. As of PHP 5.2.11.
+ - Desabilita o carregamento de entidades externas. Disponível a partir do PHP 5.2.11.
</simpara>
</listitem>
</itemizedlist>
@@ -897,62 +883,59 @@
<listitem>
<simpara>
<function>mb_stripos</function>
- - Finds position of first occurrence of a string within another,
- case insensitive
+ - Encontra a posição da primeira ocorrência de uma string dentro de outra, case insensitive
</simpara>
</listitem>
<listitem>
<simpara>
<function>mb_stristr</function>
- - Finds first occurrence of a string within another, case insensitive
+ - Encontra a primeira ocorrência de uma string dentro de outra, case insensitive
</simpara>
</listitem>
<listitem>
<simpara>
<function>mb_strrchr</function>
- - Finds the last occurrence of a character in a string within another
+ - Encontra a última ocorrência de um caractere dentro de uma string
</simpara>
</listitem>
<listitem>
<simpara>
<function>mb_strrichr</function>
- - Finds the last occurrence of a character in a string within another,
- case insensitive
+ - Encontra a última ocorrência de um caractere dentro de uma string, case insensitive
</simpara>
</listitem>
<listitem>
<simpara>
<function>mb_strripos</function>
- - Finds position of last occurrence of a string within another,
- case insensitive
+ - Encontra a posição da última ocorrência de uma string dentro de outra, case insensitive
</simpara>
</listitem>
<listitem>
<simpara>
<function>mb_strstr</function>
- - Finds first occurrence of a string within another
+ - Encontra a primeira ocorrência de uma string dentro de outra.
</simpara>
</listitem>
</itemizedlist>
- <para><link linkend="ref.ming">ming</link> (As of PHP 5.2.1):</para>
+ <para><link linkend="ref.ming">ming</link> (A partir do PHP 5.2.1):</para>
<itemizedlist>
<listitem>
<simpara>
void ming_setSWFCompression(int num)
- - Sets output compression
+ - Define a compressão de saída
</simpara>
</listitem>
<listitem>
<simpara>
void swfmovie::namedanchor(string name)
- - Creates anchor
+ - Cria um link
</simpara>
</listitem>
<listitem>
<simpara>
void swfmovie::protect([string password])
- - Protects
+ - Protege
</simpara>
</listitem>
</itemizedlist>
@@ -962,19 +945,19 @@
<listitem>
<simpara>
<function>openssl_csr_get_public_key</function>
- - Extracts public key from a CERT and prepares it for use
+ - Extrai a chave pública de um CERT e a prepara para uso
</simpara>
</listitem>
<listitem>
<simpara>
<function>openssl_csr_get_subject</function>
- - Returns the subject of a CERT
+ - Retorna o assunto de um certificado
</simpara>
</listitem>
<listitem>
<simpara>
<function>openssl_pkey_get_details</function>
- - Returns an array with the key details (bits, pkey, type)
+ - Retorna um array com os detalhes da chave (bits, pkey, type)
</simpara>
</listitem>
</itemizedlist>
@@ -984,13 +967,13 @@
<listitem>
<simpara>
<function>spl_object_hash</function>
- - Return hash id for given object
+ - Retorna a identificação hash do objeto dado
</simpara>
</listitem>
<listitem>
<simpara>
int iterator_apply(Traversable it, mixed function [, mixed params])
- - Calls a function for every element in an iterator
+ - Chama uma função para cada elemento em um iterator
</simpara>
</listitem>
</itemizedlist>
@@ -1000,7 +983,7 @@
<listitem>
<simpara>
<function>preg_last_error</function>
- - Returns the error code of the last regex execution
+ - Retorna o código de erro da última execução regex
</simpara>
</listitem>
</itemizedlist>
@@ -1010,7 +993,7 @@
<listitem>
<simpara>
<function>pg_field_table</function>
- - Returns the name of the table field belongs to, or table's oid
+ - Retorna o nome da tabela na qual o campo pertence ou o oid da tabela
if <literal>oid_only</literal> is &true;
</simpara>
</listitem>
@@ -1021,7 +1004,7 @@
<listitem>
<simpara>
<function>posix_initgroups</function>
- - Calculate the group access list for the user specified in name
+ - Calcula a lista de acesso de grupo para o usuário especificado no nome
</simpara>
</listitem>
</itemizedlist>
@@ -1031,7 +1014,7 @@
<listitem>
<simpara>
<function>gmp_nextprime</function>
- - Finds next prime number
+ - Localiza o próximo número primo
</simpara>
</listitem>
</itemizedlist>
@@ -1041,31 +1024,31 @@
<listitem>
<simpara>
<function>xmlwriter_full_end_element</function>
- - End current element - returns &false; on error
+ - Fecha o elemento atual - retorna &false; em caso de erro
</simpara>
</listitem>
<listitem>
<simpara>
<function>xmlwriter_write_raw</function>
- - Write text - returns &false; on error
+ - Escreve texto - retorna &false; em caso de erro
</simpara>
</listitem>
<listitem>
<simpara>
<function>xmlwriter_start_dtd_entity</function>
- - Create start DTD Entity - returns &false; on error
+ - Cria o ínicio de uma entidade DTD - retorna &false; em caso de erro
</simpara>
</listitem>
<listitem>
<simpara>
<function>xmlwriter_end_dtd_entity</function>
- - End current DTD Entity - returns &false; on error
+ - Fecha a entidade DTD atual - retorna &false; em caso de erro
</simpara>
</listitem>
<listitem>
<simpara>
<function>xmlwriter_write_dtd_entity</function>
- - Write full DTD Entity tag - returns &false; on error
+ - Excreve uma tag de entidade DTD completa - retorna &false; em caso de erro
</simpara>
</listitem>
</itemizedlist>
@@ -1072,9 +1055,9 @@
</section>
<section xml:id="migration52.methods">
- <title>New Methods</title>
+ <title>Novos métodos</title>
<para>
- New methods were introduced in 5.2.0:
+ Novos métodos foram introduzidos no PHP 5.2.0:
</para>
<para><link linkend="book.dom">dom</link>:</para>
@@ -1082,44 +1065,43 @@
<listitem>
<simpara>
<function>DOMDocument::registerNodeClass</function>
- - Register extended class used to create base node type
+ - Registra uma classe estendida usada para criar um tipo de nó base
</simpara>
</listitem>
<listitem>
<simpara>
<function>DOMElement::setIDAttribute</function>
- - Declares the attribute specified by name to be of type ID
+ - Declara o atributo especificado pelo nome para ser do tipo ID
</simpara>
</listitem>
<listitem>
<simpara>
<function>DOMElement::setIDAttributeNode</function>
- - Declares the attribute specified by node to be of type ID
+ - Declara o atributo especificado pelo nó para ser do tipo ID
</simpara>
</listitem>
<listitem>
<simpara>
<function>DOMElement::setIDAttributeNS</function>
- - Declares the attribute specified by local name and namespace URI to be
- of type ID
+ - Declara o atributo especificado pelo nome local e pelo URI do namespace para ser do tipo ID
</simpara>
</listitem>
<listitem>
<simpara>
<methodname>DOMNode::C14N</methodname>([bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]])
- - Canonicalize nodes to a string
+ - Canoniza os nós para uma string
</simpara>
</listitem>
<listitem>
<simpara>
<methodname>DOMNode::C14NFile</methodname>(string uri [, bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]])
- - Canonicalize nodes to a file
+ - Canoniza os nós para um arquivo
</simpara>
</listitem>
<listitem>
<simpara>
<methodname>DOMNode::getNodePath</methodname>()
- - Gets an <literal>xpath</literal> for a node
+ - Obtém um <literal>xpath</literal> para um nó
</simpara>
</listitem>
</itemizedlist>
@@ -1129,7 +1111,7 @@
<listitem>
<simpara>
<methodname>SoapServer::setObject</methodname>(object obj)
- - Sets object which will handle SOAP requests
+ - Define o objeto que seja manipulado pelas requisições SOAP
</simpara>
</listitem>
</itemizedlist>
@@ -1139,104 +1121,103 @@
<listitem>
<simpara>
int <methodname>ArrayObject::asort</methodname>(void)
- - Sort the entries by values
+ - Organiza as entradas pelos valores
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>ArrayObject::ksort</methodname>(void)
- - Sort the entries by key
+ - Organiza as entradas pelas chaves
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>ArrayObject::natcasesort</methodname>(void)
- - Sort the entries by key using case insensitive
- "natural order" algorithm.
+ - Organiza as entradas pelas chaves usando o algoritmo case insensitive de "ordem natural"
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>ArrayObject::natsort</methodname>(void)
- - Sort the entries by values using "natural order" algorithm.
+ - Organiza as entradas por valores usando o algoritmo de "ordem natural".
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>ArrayObject::uasort</methodname>(callback cmp_function)
- - Sort the entries by values using a user defined function
+ - Organiza as entradas por valores usando uma função definida pelo usuário
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>ArrayObject::uksort</methodname>(callback cmp_function)
- - Sort the entries by key using a user defined function.
+ - Organiza as entradas por chaves usando uma função definida pelo usuário.
</simpara>
</listitem>
<listitem>
<simpara>
ArrayIterator <methodname>AppendIterator::getArrayIterator</methodname>()
- - Get access to inner <literal>ArrayIterator</literal>
+ - Obem acesso ao <literal>ArrayIterator</literal> interno
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>AppendIterator::getIteratorIndex</methodname>()
- - Get index of iterator
+ - Obtém o índice do iterator
</simpara>
</listitem>
<listitem>
<simpara>
bool <methodname>CachingIterator::getCache</methodname>()
- - Return the cache
+ - Retorna o cache
</simpara>
</listitem>
<listitem>
<simpara>
int <methodname>CachingIterator::getFlags</methodname>()
- - Return the internal flags
+ - Retorna o sinalizador interno
</simpara>
</listitem>
<listitem>
<simpara>
bool <methodname>CachingIterator::offsetExists</methodname>(mixed index)
- - Returns &true; if the requested index exists
+ - Retorna &true; se o índice solicitado existir
</simpara>
</listitem>
<listitem>
<simpara>
string <methodname>CachingIterator::offsetGet</methodname>(mixed index)
- - Return the internal cache if used
+ - Retorna o cache interno de usado
</simpara>
</listitem>
<listitem>
<simpara>
void <methodname>CachingIterator::offsetSet</methodname>(mixed index, mixed newval)
- - Set given index in cache
+ - Define o índice dado no cache
</simpara>
</listitem>
<listitem>
<simpara>
void <methodname>CachingIterator::offsetUnset</methodname>(mixed index)
- - Unset given index in cache
+ - Remove o índice dado no cache
</simpara>
</listitem>
<listitem>
<simpara>
void <methodname>CachingIterator::setFlags</methodname>()
- - Set the internal flags
+ - Define o sinalizador interno
</simpara>
</listitem>
<listitem>
<simpara>
array("delimiter" =>, "enclosure" =>) <methodname>SplFileObject::getCsvControl</methodname>(void)
- - Get the delimiter and enclosure character used in <function>fgetcsv</function>
+ - Obtém o delimitador e o enclosure usado na função <function>fgetcsv</function>
</simpara>
</listitem>
<listitem>
<simpara>
void <methodname>SplFileObject::setCsvControl</methodname>([string delimiter = ',' [, string enclosure = '"']])
- - Set the delimiter and enclosure character used in <function>fgetcsv</function>
+ - Define o delimitador e o enclosure usado na função <function>fgetcsv</function>
</simpara>
</listitem>
</itemizedlist>
@@ -1246,7 +1227,7 @@
<listitem>
<simpara>
tidyNode <methodname>tidyNode::getParent</methodname>()
- - Returns the parent node of the current node (Added in PHP 5.2.2)
+ - Retorna o nó pai do nó atual (Adicionado no PHP 5.2.2)
</simpara>
</listitem>
</itemizedlist>
@@ -1256,8 +1237,8 @@
<listitem>
<simpara>
boolean <function>XMLReader::setSchema</function>
- - Use W3C XSD schema to validate the document as it is processed. Activation is
- only possible before the first <function>XMLReader::read</function>
+ - Usa o esquema W3C XSD para validar o documento da forma como ele é processado. A Ativação
+ somente é possível antes do primeiro <function>XMLReader::read</function>
</simpara>
</listitem>
</itemizedlist>
@@ -1267,7 +1248,7 @@
<listitem>
<simpara>
<methodname>ZipArchive::addEmptyDir</methodname>()
- - Creates an empty directory in the archive
+ - Cria um diretório vazio no arquivo
</simpara>
</listitem>
</itemizedlist>
@@ -1276,9 +1257,9 @@
<section xml:id="migration52.removed-extensions">
<title>Removed Extensions</title>
<para>
- These extensions have been moved to PECL and are no longer
- part of the PHP distribution. The PECL package version of
- these extensions will be created according to user demand.
+ Essas extensões foram movidas para a PECL e não fazem mais parte da
+ distribuição do PHP. As versões do pacote PECL para essas extensões
+ serão criadas de acordo com a demanda de utilização do usuário.
</para>
<itemizedlist>
<listitem>
@@ -1295,31 +1276,31 @@
</section>
<section xml:id="migration52.new-extensions">
- <title>New Extensions</title>
+ <title>Novas Extensões</title>
<para>
- The following are new extensions added (by default) as of PHP 5.2.0:
+ As seguintes extensões foram adicionadas (por padrão) a partir da versão de PHP 5.2.0:
</para>
<itemizedlist>
<listitem>
<simpara>
<link linkend="ref.filter">Filter</link>
- - validates and filters data, and is designed for use with insecure
- data such as user input. This extension is enabled by default; the
- default mode RAW does not impact input data in any way.
+ - valida e filtra dados e é designado para ser usado com dados inseguros, como
+ input de dados do usuário. Essa extensão está habilitada por padrão; o modo padrão RAW
+ não impacta o input de dados de nenhuma forma.
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="ref.json">JSON</link>
- - implements the JavaScript Object Notation (JSON)
- data interchange format. This extension is enabled by default.
+ - implementa o formato de intercâmbio de dados JavaScript Object Notation
+ (JSON ). Essa extensão vem habilitada por padrão.
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="ref.zip">Zip</link>
- - enables you to transparently read or write ZIP
- compressed archives and the files inside them.
+ - permite ler ou escrever de forma transparente arquivos compactados ZIP
+ e arquivos dentro deles.
</simpara>
</listitem>
</itemizedlist>
@@ -1326,9 +1307,9 @@
</section>
<section xml:id="migration52.classes">
- <title>New Classes</title>
+ <title>Novas Classes</title>
<para>
- The following classes were introduced in PHP 5.2.0:
+ As seguintes classes foram introduzidas no PHP 5.2.0:
</para>
<itemizedlist>
<listitem>
@@ -1400,49 +1381,49 @@
<listitem>
<simpara>
RegexIterator::__construct(Iterator it, string regex [, int mode [, int flags [, int preg_flags]]])
- - Create an <literal>RegexIterator</literal> from another iterator and a regular expression
+ - Cria um <literal>RegexIterator</literal> de outro iterator e uma expressão regular
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::accept()
- - Match (string)current() against regular expression
+ - Combina a (string)current() contra uma expressão regular
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::getFlags()
- - Returns current operation flags
+ - Retorna o sinalizador de operação atual
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::getMode()
- - Returns current operation mode
+ - Retorna o modo de operação atual
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::getPregFlags()
- - Returns current PREG flags (if in use or &null;)
+ - Retorna o sinalizador PREG atual (se estiver em uso ou &null;)
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::setFlags(int new_flags)
- - Set operation flags
+ - Define o sinalizador da opeação
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::setMode(int new_mode)
- - Set new operation mode
+ - Define um novo modo de operação
</simpara>
</listitem>
<listitem>
<simpara>
bool RegexIterator::setPregFlags(int new_flags)
- - Set PREG flags
+ - Define o sinalizador PREG
</simpara>
</listitem>
</itemizedlist>
@@ -1494,21 +1475,19 @@
<listitem>
<simpara>
RecursiveRegexIterator::__construct(RecursiveIterator it, string regex [, int mode [, int flags [, int preg_flags]]])
- - Create an <literal>RecursiveRegexIterator</literal> from another recursive iterator and
- a regular expression
+ - Cria um <literal>RecursiveRegexIterator</literal> de outro iterator recursivo e uma expressão regular
</simpara>
</listitem>
<listitem>
<simpara>
RecursiveRegexIterator RecursiveRegexIterator::getChildren()
- - Return the inner iterator's children contained in a
- <literal>RecursiveRegexIterator</literal>
+ - Retorna o iterador filho interno contido em um <literal>RecursiveRegexIterator</literal>
</simpara>
</listitem>
<listitem>
<simpara>
bool RecursiveRegexIterator::hasChildren()
- - Check whether the inner iterator's current element has children
+ - Verifica se o elemento atual do iterator interno tem filhos
</simpara>
</listitem>
</itemizedlist>
@@ -1517,7 +1496,7 @@
</section>
<section xml:id="migration52.global-constants">
- <title>New Global Constants</title>
+ <title>Novas Constantes Globais</title>
<para>PHP Core:</para>
<itemizedlist>
@@ -1660,7 +1639,7 @@
<constant>CURLOPT_TCP_NODELAY</constant>
</simpara>
<simpara>
- Added in PHP 5.2.1.
+ Adicionadas no PHP 5.2.1.
</simpara>
</listitem>
<listitem>
@@ -1668,7 +1647,7 @@
<constant>CURLOPT_TIMEOUT_MS</constant>
</simpara>
<simpara>
- Added in PHP 5.2.3
+ Adicionadas no PHP 5.2.3
</simpara>
</listitem>
<listitem>
@@ -1676,7 +1655,7 @@
<constant>CURLOPT_CONNECTTIMEOUT_MS</constant>
</simpara>
<simpara>
- Added in PHP 5.2.3
+ Adicionadas no PHP 5.2.3
</simpara>
</listitem>
</itemizedlist>
@@ -1688,7 +1667,7 @@
<constant>GMP_VERSION</constant>
</simpara>
<simpara>
- Added in PHP 5.2.2.
+ Adicionadas no PHP 5.2.2.
</simpara>
</listitem>
</itemizedlist>
@@ -1816,7 +1795,7 @@
</section>
<section xml:id="migration52.class-constants">
- <title>New Class Constants</title>
+ <title>Novas Constantes de Classes</title>
<para><link linkend="intro.pdo">pdo</link>:</para>
<itemizedlist>
@@ -1835,7 +1814,7 @@
<constant>PDO::FETCH_KEY_PAIR</constant>
</simpara>
<simpara>
- Fetches a 2 column result set into an associated array. (Added in PHP 5.2.3)
+ Traz um result set de 2 colunas dentro de um array associativo. (Adicionada no PHP 5.2.3)
</simpara>
</listitem>
</itemizedlist>
@@ -1871,9 +1850,9 @@
</section>
<section xml:id="migration52.newconf">
- <title>New INI Configuration Directives</title>
+ <title>Novas Diretivas INI de Configuração</title>
<para>
- New &php.ini; directives introduced in PHP 5.2.0:
+ Novas &php.ini; diretivas introduzidas no PHP 5.2.0:
</para>
<itemizedlist>
<listitem>
@@ -1881,13 +1860,12 @@
<link linkend="ini.allow-url-include">allow_url_include</link>
</simpara>
<simpara>
- This useful option makes it possible to differentiate between
- standard file operations on remote files, and the inclusion of
- remote files. While the former is usually desirable, the latter can
- be a security risk if used naively. Starting with PHP 5.2.0, you can
- allow remote file operations while disallowing the inclusion of
- remote files in local scripts. In fact, this is the default
- configuration.
+ Essa opção torna possível diferenciar entre operações de arquivos padrão e em
+ arquivos remotos, e a inclusão de arquivos remotos. Enquanto o primeiro é geralmente
+ desejável, o último pode ser um risco de segurança se usado de forma ingênua.
+ A partir do PHP 5.2.0, você pode permitir operações de arquivos remotos enquanto
+ não permite a inclusão de arquivos remotos nos scripts locais. Na
+ verdade, essa é a configuração padrão.
</simpara>
</listitem>
<listitem>
@@ -1895,7 +1873,7 @@
<link linkend="ini.pcre.backtrack-limit">pcre.backtrack_limit</link>
</simpara>
<simpara>
- PCRE's backtracking limit.
+ Limite de backtracking do PCRE.
</simpara>
</listitem>
<listitem>
@@ -1903,10 +1881,10 @@
<link linkend="ini.pcre.recursion-limit">pcre.recursion_limit</link>
</simpara>
<simpara>
- PCRE's recursion limit. Please note that if you set this value to a high
- number you may consume all the available process stack and eventually
- crash PHP (due to reaching the stack size limit imposed by the Operating
- System).
+ Limite de recursão do PCRE. Por favor, note que se você definir este valor
+ para um número elevado, você pode consumir toda a pilha de processo
+ disponível e, eventualmente causar um crash no PHP (devido ao atingimento
+ do tamanho limite da pilha imposto pelo sistema operacional).
</simpara>
</listitem>
<listitem>
@@ -1914,15 +1892,15 @@
<link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>
</simpara>
<simpara>
- Marks the cookie as accessible only through the HTTP protocol. This means
- that the cookie won't be accessible by scripting languages, such as
- JavaScript. This setting can effectively help to reduce identity theft
- through XSS attacks (although it is not supported by all browsers).
+ Marca o cookie acessível apenas através do protocolo HTTP. Isso significa
+ que o cookie não será acessível pelas linguagens de script, como o Javascript.
+ Essa configuração pode efetivamente reduzir o roubo de identidade através de
+ ataques XSS (mesmo não sendo suportado por todos os navegadores).
</simpara>
</listitem>
</itemizedlist>
<para>
- New directives in PHP 5.2.2:
+ Novas diretivas no PHP 5.2.2:
</para>
<itemizedlist>
<listitem>
@@ -1930,8 +1908,7 @@
<link linkend="ini.max-input-nesting-level">max_input_nesting_level</link>
</simpara>
<simpara>
- Limits how deep <link linkend="language.variables.external">input
- variables</link> can be nested, default is 64.
+ Limite o quão profundo as <link linkend="language.variables.external">variáveis de entrada</link> podem ser aninhadas, o padrão é 64.
</simpara>
</listitem>
</itemizedlist>
@@ -1938,72 +1915,72 @@
</section>
<section xml:id="migration52.errorrep">
- <title>Error Reporting</title>
+ <title>Relatório de Erros</title>
<para>
- Some of the existing <constant>E_ERROR</constant> conditions have been
- converted to something that can be caught with a user-defined error
- handler. If an <link
+ Algumas das condições <constant>E_ERROR</constant> existentes foram
+ convertidas para algo que pudesse ser tratado com um manipulador de
+ erros definidos pelo usuário. Se um <link
linkend="errorfunc.constants"><constant>E_RECOVERABLE_ERROR</constant></link>
- is not handled, it will behave in the same way as
- <constant>E_ERROR</constant> behaves in all versions of PHP. Errors of
- this type are logged as <literal>Catchable fatal error</literal>.
+ não é tratado, ele vai se comportar da mesma maneira como o <constant>E_ERROR</constant>
+ se comporta em todas as versões do PHP. Erros desse tipo são registrados como
+ <literal>Catchable fatal error</literal>.
</para>
<para>
- This change means that the value of the <constant>E_ALL</constant>
- <link linkend="ini.error-reporting">error_reporting</link> constant is
- now 6143, where the previous value was 2047. Because PHP constants have
- no meaning outside of PHP, in some cases the integer value is used
- instead so these will need to be adjusted. So for example by
- setting the error_reporting mode from either the
- <link linkend="apache.configuration">httpd.conf</link> or the
- <filename>.htaccess</filename> files, the value has to be changed
- accordingly. The same applies when the numeric values are used
- rather than the constants in PHP scripts.
+ Essa mudança significa que o valor da constante <constant>E_ALL</constant>
+ <link linkend="ini.error-reporting">error_reporting</link> é agora 6143,
+ onde o valor anterior era 2047. Como as constantes PHP não tem significado
+ fora do PHP, em alguns casos o valor inteiro é usado de forma que terão de
+ ser ajustados. Assim, por exemplo, definindo o modo error_reporting de
+ qualquer arquivo <link linkend="apache.configuration">httpd.conf</link> ou
+ <filename>.htaccess</filename>, o valor será alterado de acordo com o arquivo.
+ O mesmo se aplica quando valores númericos são usados em vez de constantes nos
+ scripts PHP.
</para>
<para>
- As a side-effect of a change made to prevent duplicate error messages when
- <link linkend="ini.track-errors">track_errors</link> is
- <literal>On</literal>, it is now necessary to return &false; from
- user defined error handlers in order to populate
- <varname>$php_errormsg</varname>. This
- provides a fine-grain control over the levels of messages stored.
+ Como um efeito colateral de uma mudança feita para evitar que mensagens de erro
+ se sobreponham quando <link linkend="ini.track-errors">track_errors</link> está
+ <literal>On</literal>, agora é necessário retornar &false; a partir de manipuladores
+ de erro definidos pelo usuário afim de preencher a variável <varname>$php_errormsg</varname>.
+ Isso fornece um controle detalhado sobre os níveis de mensagens armazenadas.
</para>
</section>
<section xml:id="migration52.other">
- <title>Other Enhancements</title>
+ <title>Outras Melhorias</title>
<itemizedlist>
<listitem>
<simpara>
- Improved memory manager and increased default memory limit.
+ Melhoria no gerenciador de memória e aumento de limite de memória padrão.
</simpara>
<simpara>
- The new memory manager allocates less memory and works faster than the
- previous incarnation. It allocates memory from the system in large blocks,
- and then manages the heap by itself. The <literal>memory_limit</literal> value in &php.ini; is
- checked, not for each <literal>emalloc()</literal> call (as before), but for actual blocks
- requested from the system. This means that <literal>memory_limit</literal> is far more
- accurate than it used to be, since the old memory manager didn't calculate
- all the memory overhead used by the <literal>malloc</literal> library.
+
+ O novo gerenciador de memória aloca menos memória e funciona mais rápido que sua
+ encarnação anterior. Ele aloca memória do sistema em grandes blocos, e então
+ gerencia o heap sozinho. O valor <literal>memory_limit</literal> no &php.ini; é
+ verificado, não para cada chamada <literal>emalloc()</literal> (como antes),
+ mas para os blocos atuais solicitados pelo sistema. Isso significa que
+ <literal>memory_limit</literal> é muito mais preciso do que costumava ser,
+ uma vez que o gerenciador de memória antigo não calculava toda a sobrecarga
+ de memória utilizada pela biblioteca <literal>malloc</literal>.
</simpara>
<simpara>
- Thanks to this new-found accuracy memory usage may appear to have increased,
- although actually it has not. To accommodate this apparent increase, the
- default <literal>memory_limit</literal> setting was also increased - from 8 to 16 megabytes.
+ Graças a essa recém-descoberta a precisão do uso de memória parece ter aumentado,
+ embora na verdade não aumentou. Para acomodar esse aumento aparente, a configuração
+ padrão do <literal>memory_limit</literal> também foi aumentada - de 8 para 16 megabytes.
</simpara>
</listitem>
<listitem>
<simpara>
- Added support for constructors in interfaces to force constructor signature
- checks in implementations.
+ Adicionado suporte para construtores em interfaces para forçar a verificação
+ da assinatura em implementações.
</simpara>
<simpara>
- Starting with PHP 5.2.0, interfaces can have constructors. However, if you choose
- to declare a constructor in an interface, each class implementing that interface
- MUST include a constructor with a signature matching that of the base interface
- constructor. By 'signature' we mean the parameter and return type definitions,
- including any type hints and including whether the data is passed by reference
- or by value.
+ A partir do PHP 5.2.0, as interfaces podem ter. No entanto, se você escolher
+ declarar um construtor em uma interface, cada classe que implementa a interface
+ DEVE incluir um construtor com a assinatura correspondente ao construtor da
+ interface base. Por 'assinatura' queremos dizer que os parâmetros e as definições
+ de tipo de retorno, incluindo qualquer type hint, inclusive se os dados são passados
+ por referência ou por valor.
</simpara>
</listitem>
</itemizedlist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment