mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
335 lines
11 KiB
XML
335 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 976425d4f6eec32448be3cc22ec063015921b753 Maintainer: leonardolara Status: ready --><!-- CREDITS: marcosmarcolin,leonardolara -->
|
|
|
|
<sect1 xml:id="migration80.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Outras mudanças</title>
|
|
|
|
<sect2 xml:id="migration80.other-changes.sapi">
|
|
<title>Alterações nos Módulos SAPI</title>
|
|
|
|
<sect3 xml:id="migration80.other-changes.sapi.apache2handler">
|
|
<title>Apache2Handler</title>
|
|
|
|
<para>
|
|
O módulo PHP foi renomeado de <literal>php7_module</literal> para
|
|
<literal>php_module</literal>.
|
|
</para>
|
|
</sect3>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration80.other-changes.functions">
|
|
<title>Funções alteradas</title>
|
|
|
|
<sect3 xml:id="migration80.other-changes.functions.reflection">
|
|
<title>Reflection</title>
|
|
|
|
<para>
|
|
Os resultados de <methodname>ReflectionClass::getConstants</methodname> e
|
|
<methodname>ReflectionClass::getReflectionConstants</methodname> agora podem ser filtrados por meio
|
|
de um novo <parameter>filter</parameter> de parâmetro. Três novas constantes foram adicionadas para serem usadas com ele:
|
|
</para>
|
|
<para>
|
|
<simplelist>
|
|
<member><constant>ReflectionClassConstant::IS_PUBLIC</constant></member>
|
|
<member><constant>ReflectionClassConstant::IS_PROTECTED</constant></member>
|
|
<member><constant>ReflectionClassConstant::IS_PRIVATE</constant></member>
|
|
</simplelist>
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.functions.standard">
|
|
<title>Padrão</title>
|
|
|
|
<para>
|
|
As funções matemáticas <function>abs</function>, <function>ceil</function>,
|
|
<function>floor</function> e <function>round</function> agora atendem adequadamente à
|
|
diretiva <link linkend="language.types.declarations.strict"><literal>strict_types</literal></link>.
|
|
Anteriormente, eles coagiam o primeiro argumento mesmo no modo de tipo estrito.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.functions.zip">
|
|
<title>Zip</title>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
Os métodos <methodname>ZipArchive::addGlob</methodname> e
|
|
<methodname>ZipArchive::addPattern</methodname> aceitam mais valores no argumento do
|
|
array de <parameter>options</parameter>:
|
|
</para>
|
|
<para>
|
|
<simplelist>
|
|
<member><literal>flags</literal></member>
|
|
<member><literal>comp_method</literal></member>
|
|
<member><literal>comp_flags</literal></member>
|
|
<member><literal>env_method</literal></member>
|
|
<member><literal>enc_password</literal></member>
|
|
</simplelist>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Os métodos <methodname>ZipArchive::addEmptyDir</methodname>, <methodname>ZipArchive::addFile</methodname>
|
|
e <methodname>ZipArchive::addFromString</methodname>
|
|
possuem um novo argumento <parameter>flags</parameter>. Isso permite gerenciar a codificação de nomes
|
|
(<constant>ZipArchive::FL_ENC_<replaceable>*</replaceable></constant>) e a substituição de entradas
|
|
(<constant>ZipArchive::FL_OVERWRITE</constant>).
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<methodname>ZipArchive::extractTo</methodname> agora restaura o tempo de modificação do arquivo.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect3>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration80.other-changes.extensions">
|
|
<title>Outras alterações nas extensões</title>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.curl">
|
|
<title>CURL</title>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
A extensão CURL agora requer pelo menos libcurl 7.29.0.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
O parâmetro descontinuado <parameter>version</parameter> de <function>curl_version</function>
|
|
foi removido.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.date">
|
|
<title>Data e Horário</title>
|
|
|
|
<para>
|
|
<classname>DatePeriod</classname> agora implementa <interfacename>IteratorAggregate</interfacename>
|
|
(em vez de <interfacename>Traversable</interfacename>).
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.dom">
|
|
<title>DOM</title>
|
|
|
|
<para>
|
|
<classname>DOMNamedNodeMap</classname> e <classname>DOMNodeList</classname> agora implementam
|
|
<interfacename>IteratorAggregate</interfacename> (em vez de
|
|
<interfacename>Traversable</interfacename>).
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.intl">
|
|
<title>Intl</title>
|
|
|
|
<para>
|
|
<classname>IntlBreakIterator</classname> e <classname>ResourceBundle</classname> agora implementam
|
|
<interfacename>IteratorAggregate</interfacename> (em vez de <interfacename>Traversable</interfacename>).
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.enchant">
|
|
<title>Enchant</title>
|
|
|
|
<para>
|
|
A extensão enchant agora usa libenchant-2 por padrão quando disponível. libenchant versão 1 ainda é
|
|
suportada, mas foi descontinuada e pode ser removida no futuro.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.gd">
|
|
<title>GD</title>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
O parâmetro <parameter>num_points</parameter> de <function>imagepolygon</function>,
|
|
<function>imageopenpolygon</function> e <function>imagefilledpolygon</function> agora é
|
|
opcional, ou seja, essas funções podem ser chamadas com 3 ou 4 argumentos. Se o argumento for
|
|
omitido, será calculado como <code>count($points)/2</code>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
A função <function>imagegetinterpolation</function> para obter o método de interpolação atual
|
|
foi adicionada.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.json">
|
|
<title>JSON</title>
|
|
|
|
<para>
|
|
A extensão JSON não pode mais ser desativada e é sempre parte integrante de qualquer compilação do PHP,
|
|
semelhante à extensão de data.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.mbstring">
|
|
<title>MBString</title>
|
|
|
|
<para>
|
|
As tabelas de dados Unicode foram atualizadas para a versão 13.0.0.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.pdo">
|
|
<title>PDO</title>
|
|
|
|
<para>
|
|
<classname>PDOStatement</classname> agora implementa
|
|
<interfacename>IteratorAggregate</interfacename> (em vez de
|
|
<interfacename>Traversable</interfacename>).
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.libxml">
|
|
<title>LibXML</title>
|
|
|
|
<para>
|
|
A versão mínima necessária do libxml agora é 2.9.0. Isso significa que o carregamento de entidade externa agora
|
|
está desativado por padrão e nenhuma etapa extra precisa ser tomada para proteger contra
|
|
ataques XXE.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.mysqli">
|
|
<title>MySQLi / PDO MySQL</title>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
Quando mysqlnd não é usado (que é a opção padrão e recomendada), a versão mínima suportada do
|
|
libmysqlclient agora é 5.5.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<classname>mysqli_result</classname> agora implementa
|
|
<interfacename>IteratorAggregate</interfacename> (ao invés de
|
|
<interfacename>Traversable</interfacename>).
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.pgsql">
|
|
<title>PGSQL / PDO PGSQL</title>
|
|
|
|
<para>
|
|
As extensões PGSQL e PDO PGSQL agora requerem pelo menos libpq 9.1.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.readline">
|
|
<title>Readline</title>
|
|
|
|
<para>
|
|
Chamar <function>readline_completion_function</function> antes do início do prompt interativo
|
|
(por exemplo, em <link linkend="ini.auto-prepend-file">auto_prepend_file</link>) agora substituirá a
|
|
função padrão de conclusão do prompt interativo. Anteriormente,
|
|
<function>readline_completion_function</function> só funcionava quando chamado após iniciar o
|
|
prompt interativo.
|
|
</para>
|
|
</sect3>
|
|
|
|
<sect3 xml:id="migration80.other-changes.extensions.simplexml">
|
|
<title>SimpleXML</title>
|
|
|
|
<para>
|
|
<classname>SimpleXMLElement</classname> agora implementa
|
|
<interfacename>RecursiveIterator</interfacename> e absorveu a funcionalidade de
|
|
<classname>SimpleXMLIterator</classname>. <classname>SimpleXMLIterator</classname> é uma
|
|
extensão vazia de <classname>SimpleXMLElement</classname>.
|
|
</para>
|
|
</sect3>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration80.other-changes.ini">
|
|
<title>Alterações na manipulação de arquivos INI</title>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
<!--<link linkend="ini.com.dotnet-version">-->com.dotnet_version<!--</link>-->
|
|
é uma nova diretiva INI para escolher a versão da estrutura .NET a ser usada para
|
|
objetos <classname>dotnet</classname>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<!--<link linkend="ini.zend.exception-string-param-max-len">-->zend.exception_string_param_max_len<!--</link>-->
|
|
é uma nova diretiva INI para definir o comprimento máximo da string em um argumento de uma
|
|
string de pilha stringificada.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration80.other-changes.ebcdic">
|
|
<title>EBCDIC</title>
|
|
|
|
<para>
|
|
Os destinos EBCDIC não são mais suportados, embora seja improvável que ainda
|
|
estivessem funcionando.
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration80.other-changes.performance">
|
|
<title>Desempenho</title>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
Um compilador Just-In-Time (JIT) foi adicionado à extensão opcache.
|
|
<!-- https://wiki.php.net/rfc/jit -->
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<function>array_slice</function> em um array sem lacunas não irá mais varrer todo o array
|
|
para encontrar a posição inicial. Isso pode reduzir significativamente o tempo de execução
|
|
da função com grandes deslocamentos e pequenos comprimentos.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<function>strtolower</function> agora usa uma implementação SIMD ao usar a localidade
|
|
<constant>LC_CTYPE</constant> <literal>"C"</literal> (que é o padrão).
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|