mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
1462 lines
52 KiB
XML
1462 lines
52 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: 8ea24dc32374bf4f6b04005e317101e4c65a0214 Maintainer: leonardolara Status: ready --><!-- CREDITS: marcosmarcolin, leonardolara -->
|
||
<sect1 xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="opcache.configuration">
|
||
&reftitle.runtime;
|
||
&extension.runtime;
|
||
<para>
|
||
<table>
|
||
<title>Opções de configuração do OPcache</title>
|
||
<tgroup cols="4">
|
||
<thead>
|
||
<row>
|
||
<entry>&Name;</entry>
|
||
<entry>&Default;</entry>
|
||
<entry>&Changeable;</entry>
|
||
<entry>&Changelog;</entry>
|
||
</row>
|
||
</thead>
|
||
<tbody xml:id="opcache.configuration.list">
|
||
<row>
|
||
<entry><link linkend="ini.opcache.enable">opcache.enable</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.enable-cli">opcache.enable_cli</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Entre PHP 7.1.2 e 7.1.6 inclusive, o padrão era <literal>1</literal></entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry>
|
||
<entry>128</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.interned-strings-buffer">opcache.interned_strings_buffer</link></entry>
|
||
<entry>8</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.max-accelerated-files">opcache.max_accelerated_files</link></entry>
|
||
<entry>10000</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.max-wasted-percentage">opcache.max_wasted_percentage</link></entry>
|
||
<entry>5</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.use-cwd">opcache.use_cwd</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link></entry>
|
||
<entry>2</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.revalidate-path">opcache.revalidate_path</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.save-comments">opcache.save_comments</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.fast-shutdown">opcache.fast_shutdown</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Removido no PHP 7.2.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.enable-file-override">opcache.enable_file_override</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.optimization-level">opcache.optimization_level</link></entry>
|
||
<entry>0x7FFEBFFF</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Alterado de <literal>0x7FFFBFFF</literal> no PHP 7.3.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.inherited-hack">opcache.inherited_hack</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Removido no PHP 7.3.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.dups-fix">opcache.dups_fix</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.blacklist-filename">opcache.blacklist_filename</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.max-file-size">opcache.max_file_size</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.consistency-checks">opcache.consistency_checks</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Desativado a partir do 8.1.18 e 8.2.5. Removido a partir do PHP 8.3.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.force-restart-timeout">opcache.force_restart_timeout</link></entry>
|
||
<entry>180</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.error-log">opcache.error_log</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.record-warnings">opcache.record_warnings</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.preferred-memory-model">opcache.preferred_memory_model</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.protect-memory">opcache.protect_memory</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.mmap-base">opcache.mmap_base</link></entry>
|
||
<entry>&null;</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.restrict-api">opcache.restrict_api</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link></entry>
|
||
<entry>2</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.huge_code_pages">opcache.huge_code_pages</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.lockfile_path">opcache.lockfile_path</link></entry>
|
||
<entry>"/tmp"</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 7.1.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.file-cache">opcache.file_cache</link></entry>
|
||
<entry>&null;</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.file-cache-only">opcache.file_cache_only</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.file-cache-consistency-checks">opcache.file_cache_consistency_checks</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry/>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.file-cache-fallback">opcache.file_cache_fallback</link></entry>
|
||
<entry>1</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Somente Windows.</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.validate-permission">opcache.validate_permission</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 7.0.14</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.validate-root">opcache.validate_root</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 7.0.14</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.preload">opcache.preload</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 7.4.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.preload-user">opcache.preload_user</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 7.4.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.cache-id">opcache.cache_id</link></entry>
|
||
<entry>""</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Somente Windows. Disponível a partir do PHP 7.4.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit">opcache.jit</link></entry>
|
||
<entry>"disable"</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0. Antes do PHP 8.4.0, o valor padrão era "tracing".</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-buffer-size">opcache.jit_buffer_size</link></entry>
|
||
<entry>64M</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0. Antes do PHP 8.4.0, o valor padrão era 0.</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-debug">opcache.jit_debug</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-bisect-limit">opcache.jit_bisect_limit</link></entry>
|
||
<entry>0</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-prof-threshold">opcache.jit_prof_threshold</link></entry>
|
||
<entry>0.005</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-root-traces">opcache.jit_max_root_traces</link></entry>
|
||
<entry>1024</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-side-traces">opcache.jit_max_side_traces</link></entry>
|
||
<entry>128</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-exit-counters">opcache.jit_max_exit_counters</link></entry>
|
||
<entry>8192</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-hot-loop">opcache.jit_hot_loop</link></entry>
|
||
<entry>64</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-hot-func">opcache.jit_hot_func</link></entry>
|
||
<entry>127</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-hot-return">opcache.jit_hot_return</link></entry>
|
||
<entry>8</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-hot-side-exit">opcache.jit_hot_side_exit</link></entry>
|
||
<entry>8</entry>
|
||
<entry><constant>INI_SYSTEM</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-blacklist-root-trace">opcache.jit_blacklist_root_trace</link></entry>
|
||
<entry>16</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-blacklist-side-trace">opcache.jit_blacklist_side_trace</link></entry>
|
||
<entry>8</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-loop-unrolls">opcache.jit_max_loop_unrolls</link></entry>
|
||
<entry>8</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-recursive-calls">opcache.jit_max_recursive_calls</link></entry>
|
||
<entry>2</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-recursive-return">opcache.jit_max_recursive_returns</link></entry>
|
||
<entry>2</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
<row>
|
||
<entry><link linkend="ini.opcache.jit-max-polymorphic-calls">opcache.jit_max_polymorphic_calls</link></entry>
|
||
<entry>2</entry>
|
||
<entry><constant>INI_ALL</constant></entry>
|
||
<entry>Disponível a partir do PHP 8.0.0</entry>
|
||
</row>
|
||
</tbody>
|
||
</tgroup>
|
||
</table>
|
||
&ini.php.constants;
|
||
</para>
|
||
|
||
&ini.descriptions.title;
|
||
|
||
<variablelist>
|
||
<varlistentry xml:id="ini.opcache.enable">
|
||
<term>
|
||
<parameter>opcache.enable</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Habilita o cache opcode. Quando desabilitado, o código não é otimizado ou
|
||
armazenado em cache. A configuração <literal>opcache.enable</literal> não pode ser
|
||
habilitada em tempo de execução através de <function>ini_set</function>, ela só pode
|
||
ser desabilitada. Tentar ativá-lo em um script gerará um aviso.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.enable-cli">
|
||
<term>
|
||
<parameter>opcache.enable_cli</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Ativa o cache opcode para a versão CLI do PHP.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.memory-consumption">
|
||
<term>
|
||
<parameter>opcache.memory_consumption</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O tamanho do armazenamento de memória compartilhada usado pelo OPcache, em megabytes.
|
||
O valor mínimo permitido é <literal>"8"</literal>,
|
||
que é aplicado se um valor menor for definido.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.interned-strings-buffer">
|
||
<term>
|
||
<parameter>opcache.interned_strings_buffer</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
A quantidade de memória usada para armazenar strings internas, em megabytes.
|
||
O valor máximo é de 32767 em arquiteturas de 64 bits.,
|
||
e 4095 nas de 32 bits.
|
||
</simpara>
|
||
<note>
|
||
<simpara>
|
||
Antes do PHP 8.4.0, o valor máximo era de 4095 megabytes para todas
|
||
as arquiteturas.
|
||
</simpara>
|
||
</note>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.max-accelerated-files">
|
||
<term>
|
||
<parameter>opcache.max_accelerated_files</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O número máximo de chaves (e, portanto, scripts) na tabela de hash do OPcache.
|
||
O valor real usado será o primeiro número no conjunto de
|
||
números primos
|
||
<literal>{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }</literal>
|
||
que é maior ou igual ao valor configurado. O valor mínimo é 200. O valor máximo
|
||
é 1.000.000.
|
||
Valores fora desta faixa são fixados na faixa permitida.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.max-wasted-percentage">
|
||
<term>
|
||
<parameter>opcache.max_wasted_percentage</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
A porcentagem máxima de memória desperdiçada que é permitida antes de uma reinicialização
|
||
ser planejada, se houver memória livre insuficiente.
|
||
O valor máximo permitido é <literal>"50"</literal>,
|
||
que é aplicado se um valor maior for definido.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.use-cwd">
|
||
<term>
|
||
<parameter>opcache.use_cwd</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Se ativado, o OPcache anexa o diretório de trabalho atual à chave de script,
|
||
eliminando assim possíveis colisões entre arquivos com o mesmo nome de base.
|
||
Desativar esta diretiva melhora o desempenho, mas pode interromper os
|
||
aplicativos existentes.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.validate-timestamps">
|
||
<term>
|
||
<parameter>opcache.validate_timestamps</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<para>
|
||
Se ativado, o OPcache verificará os scripts atualizados a cada
|
||
<link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link>
|
||
segundos. Quando esta diretiva é desativada, você deve redefinir o OPcache
|
||
manualmente via <function>opcache_reset</function>,
|
||
<function>opcache_invalidate</function> ou reiniciando o servidor Web
|
||
para que as alterações no sistema de arquivos entrem em vigor.
|
||
<note>
|
||
<simpara>
|
||
O OPcache ainda pode validar o carimbo de data e hora de um arquivo durante o tempo de compilação se
|
||
as opções <link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link> ou
|
||
<link linkend="ini.opcache.max-file-size">opcache.max_file_size</link>
|
||
estiverem definidas com valores diferentes de zero.
|
||
</simpara>
|
||
</note>
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.revalidate-freq">
|
||
<term>
|
||
<parameter>opcache.revalidate_freq</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Com que frequência verificar carimbos de data/hora do script para atualizações, em segundos.
|
||
<literal>0</literal> resultará na verificação de atualizações do OPcache em
|
||
cada solicitação.
|
||
</simpara>
|
||
<simpara>
|
||
Esta diretiva de configuração será ignorada se
|
||
<link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link>
|
||
estiver desativado.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.revalidate-path">
|
||
<term>
|
||
<parameter>opcache.revalidate_path</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Se desativado, os arquivos em cache existentes usando o mesmo
|
||
<link linkend="ini.include-path">include_path</link> serão reutilizados.
|
||
Assim, se um arquivo com o mesmo nome estiver em outro lugar no include_path,
|
||
ele não será encontrado.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.save-comments">
|
||
<term>
|
||
<parameter>opcache.save_comments</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Se desativado, todos os comentários da documentação serão descartados
|
||
do cache do opcode para reduzir o tamanho do código otimizado. Desativar esta
|
||
diretiva de configuração pode interromper aplicativos e frameworks que
|
||
dependem da análise de comentários para anotações, incluindo Doctrine, Zend Framework 2
|
||
e PHPUnit.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.fast-shutdown">
|
||
<term>
|
||
<parameter>opcache.fast_shutdown</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Se ativado, uma sequência de desligamento rápido é usada que não libera cada
|
||
bloco alocado, mas depende do gerenciador de memória do Zend Engine para
|
||
desalocar todo o conjunto de variáveis de solicitação em massa.
|
||
</simpara>
|
||
<simpara>
|
||
Esta diretiva foi removida no PHP 7.2.0. Uma variante da sequência
|
||
de desligamento rápido foi integrada ao PHP e será usada automaticamente,
|
||
se possível.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.enable-file-override">
|
||
<term>
|
||
<parameter>opcache.enable_file_override</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Quando ativado, o cache opcode será verificado para saber se um arquivo
|
||
já foi armazenado em cache quando <function>file_exists</function>,
|
||
<function>is_file</function> e <function>is_readable</function> são
|
||
chamados. Isso pode aumentar o desempenho em aplicativos que verificam
|
||
a existência e legibilidade de scripts PHP, mas corre o risco de retornar dados desatualizados
|
||
se
|
||
<link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link>
|
||
estiver desabilitado.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.optimization-level">
|
||
<term>
|
||
<parameter>opcache.optimization_level</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Uma máscara de bits que controla quais passos de otimização são executados.
|
||
O valor padrão é <literal>0x7FFEBFFF</literal>, que habilita todas as
|
||
otimizações seguras. Desabilitar otimizações ou habilitar otimizações inseguras
|
||
é útil na maioria das vezes para depurar/desenvolver o otimizador.
|
||
</simpara>
|
||
<simpara>
|
||
Cada bit da máscara habilita um passo específico da otimização:
|
||
</simpara>
|
||
<table>
|
||
<title>Máscara de Bits de Passos da Otimização</title>
|
||
<tgroup cols="4">
|
||
<thead>
|
||
<row>
|
||
<entry>Bit</entry>
|
||
<entry>Nome do Passo</entry>
|
||
<entry>&Description;</entry>
|
||
<entry>Padrão</entry>
|
||
</row>
|
||
</thead>
|
||
<tbody>
|
||
<row>
|
||
<entry>0</entry>
|
||
<entry>PASS_1</entry>
|
||
<entry>Otimizações simples de olho mágico</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>1</entry>
|
||
<entry>PASS_2</entry>
|
||
<entry>Não utilizado (mesclado ao PASS_1)</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>2</entry>
|
||
<entry>PASS_3</entry>
|
||
<entry>Otimização de salto simples</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>3</entry>
|
||
<entry>PASS_4</entry>
|
||
<entry>Otimização de chamadas</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>4</entry>
|
||
<entry>PASS_5</entry>
|
||
<entry>Otimização baseada em grafo de fluxo de controle</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>5</entry>
|
||
<entry>PASS_6</entry>
|
||
<entry>Otimização baseada em análise de fluxo de dados</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>6</entry>
|
||
<entry>PASS_7</entry>
|
||
<entry>Se o grafo de chamadas deve ser usado para otimizações baseadas em SSA.</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>7</entry>
|
||
<entry>PASS_8</entry>
|
||
<entry>Propagação esparsa de constantes condicionais</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>8</entry>
|
||
<entry>PASS_9</entry>
|
||
<entry>Otimização de variáveis temporárias</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>9</entry>
|
||
<entry>PASS_10</entry>
|
||
<entry>Remoção de opcodes NOP</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>10</entry>
|
||
<entry>PASS_11</entry>
|
||
<entry>Compactação literal</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>11</entry>
|
||
<entry>PASS_12</entry>
|
||
<entry>Pré-calcular o tamanho da pilha de chamadas</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>12</entry>
|
||
<entry>PASS_13</entry>
|
||
<entry>Remoção de variáveis não utilizadas</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>13</entry>
|
||
<entry>PASS_14</entry>
|
||
<entry>Eliminação de código morto</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>14</entry>
|
||
<entry>PASS_15</entry>
|
||
<entry>Coletar e substituir declarações constantes (inseguro)</entry>
|
||
<entry><emphasis>Desligado</emphasis></entry>
|
||
</row>
|
||
<row>
|
||
<entry>15</entry>
|
||
<entry>PASS_16</entry>
|
||
<entry>Inlining de função trivial (parte da otimização de chamadas)</entry>
|
||
<entry>Ligado</entry>
|
||
</row>
|
||
<row>
|
||
<entry>16</entry>
|
||
<entry>(Flag)</entry>
|
||
<entry>Ignorar a possibilidade de sobrecarga do operador (inseguro)</entry>
|
||
<entry><emphasis>Desligado</emphasis></entry>
|
||
</row>
|
||
</tbody>
|
||
</tgroup>
|
||
</table>
|
||
<note>
|
||
<title>Otimizações Seguras versus Inseguras</title>
|
||
<simpara>
|
||
<emphasis>Otimizações Seguras</emphasis> (habilitadas por padrão) preservam o comportamento
|
||
exato do código PHP enquanto melhora o desempenho. Elas incluem eliminação de código morto,
|
||
a redução de constantes e a otimização de saltos.
|
||
</simpara>
|
||
<simpara>
|
||
<emphasis>Otimizações Inseguras</emphasis> (desabilitadas por padrão) podem alterar o comportamento
|
||
em casos extremos:
|
||
</simpara>
|
||
<itemizedlist>
|
||
<listitem>
|
||
<simpara>
|
||
<emphasis>Bit 14</emphasis>: Coletando constantes. As constantes são substituídas
|
||
no momento da compilação, ignorando a ordem de declaração do momento da execução:
|
||
</simpara>
|
||
<informalexample>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
echo getA(); // Resultado: "hello" em vez de lançar um Error
|
||
const A = "hello";
|
||
function getA() { return A; }
|
||
]]>
|
||
</programlisting>
|
||
</informalexample>
|
||
</listitem>
|
||
<listitem>
|
||
<simpara>
|
||
<emphasis>Bit 16</emphasis>: Ignorando a sobrecarga do operador.
|
||
Inseguro ao usar classes com <literal>do_operation</literal>
|
||
(ex.: <link linkend="book.gmp">GMP</link>,
|
||
<link linkend="book.bc">BCMath</link>) em operações aritméticas.
|
||
Com declarações de tipo, o otimizador pode aplicar as mesmas otimizações de forma segura.
|
||
</simpara>
|
||
</listitem>
|
||
</itemizedlist>
|
||
</note>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.inherited-hack">
|
||
<term>
|
||
<parameter>opcache.inherited_hack</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Esta diretiva de configuração é ignorada.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.dups-fix">
|
||
<term>
|
||
<parameter>opcache.dups_fix</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Este hack só deve ser ativado para contornar os erros
|
||
"Cannot redeclare class".
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.blacklist-filename">
|
||
<term>
|
||
<parameter>opcache.blacklist_filename</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
A localização do arquivo de eliminação do OPcache. Um arquivo de eliminação
|
||
é um arquivo de texto contendo os nomes dos arquivos que não devem ser acelerados, um por
|
||
linha. Curingas(*) são permitidos e prefixos também podem ser fornecidos.
|
||
As linhas iniciadas com ponto e vírgula são ignoradas como comentários.
|
||
</simpara>
|
||
<simpara>
|
||
Um arquivo de eliminação simples pode ter a seguinte aparência:
|
||
</simpara>
|
||
<informalexample>
|
||
<programlisting>
|
||
<![CDATA[
|
||
; Corresponde a um arquivo específico.
|
||
/var/www/broken.php
|
||
; Um prefixo que corresponde a todos os arquivos que começam com x.
|
||
/var/www/x
|
||
; Uma correspondência curinga.
|
||
/var/www/*-broken.php
|
||
]]>
|
||
</programlisting>
|
||
</informalexample>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.max-file-size">
|
||
<term>
|
||
<parameter>opcache.max_file_size</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O tamanho máximo do arquivo que será armazenado em cache, em bytes. Se for
|
||
<literal>0</literal>, todos os arquivos serão armazenados em cache.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.consistency-checks">
|
||
<term>
|
||
<parameter>opcache.consistency_checks</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Se diferente de zero, o OPcache verificará a soma de verificação do cache a cada N solicitações,
|
||
onde N é o valor desta diretiva de configuração. Isso só deve ser
|
||
ativado durante a depuração, pois prejudicará o desempenho.
|
||
</simpara>
|
||
<note>
|
||
<simpara>
|
||
Desativado a partir do 8.1.18 e 8.2.5. Removido a partir do PHP 8.3.0.
|
||
</simpara>
|
||
</note>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.force-restart-timeout">
|
||
<term>
|
||
<parameter>opcache.force_restart_timeout</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O tempo de espera para iniciar uma reinicialização agendada se o cache
|
||
não estiver ativo, em segundos. Se o tempo limite for atingido, o OPcache assumirá
|
||
que algo está errado e eliminará os processos que mantêm bloqueios no cache
|
||
para permitir uma reinicialização.
|
||
</simpara>
|
||
<simpara>
|
||
Se
|
||
<link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link>
|
||
for definido como 2 ou superior, um aviso será registrado no log de erros quando
|
||
isso ocorrer.
|
||
</simpara>
|
||
<simpara>
|
||
Esta diretiva não é suportada no Windows.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.error-log">
|
||
<term>
|
||
<parameter>opcache.error_log</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O log de erros para erros do OPcache. Uma string vazia é tratada da mesma forma que
|
||
<literal>stderr</literal> e resultará no envio de logs para
|
||
erro padrão (que será o log de erro do servidor Web na maioria dos casos).
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.log-verbosity-level">
|
||
<term>
|
||
<parameter>opcache.log_verbosity_level</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O nível de verbosidade do log. Por padrão, apenas erros fatais (nível 0) e
|
||
erros (nível 1) são registrados. Outros níveis disponíveis são avisos (nível
|
||
2), mensagens informativas (nível 3) e mensagens de depuração (nível 4).
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.record-warnings">
|
||
<term>
|
||
<parameter>opcache.record_warnings</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Se ativado, o OPcache registrará avisos em tempo de compilação e os reproduzirá na
|
||
próxima inclusão, mesmo que seja servido do cache.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.preferred-memory-model">
|
||
<term>
|
||
<parameter>opcache.preferred_memory_model</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
O modelo de memória preferencial para uso do OPcache. Se deixado em branco, o OPcache
|
||
escolherá o modelo mais adequado, que é o comportamento correto
|
||
em praticamente todos os casos.
|
||
</simpara>
|
||
<simpara>
|
||
Os valores possíveis incluem <literal>mmap</literal>, <literal>shm</literal>,
|
||
<literal>posix</literal> e <literal>win32</literal>.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.protect-memory">
|
||
<term>
|
||
<parameter>opcache.protect_memory</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Protege a memória compartilhada contra gravações inesperadas durante a execução de scripts.
|
||
Isso é útil apenas para depuração interna.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.mmap-base">
|
||
<term>
|
||
<parameter>opcache.mmap_base</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
A base usada para segmentos de memória compartilhada no Windows. Todos os processos PHP
|
||
precisam mapear a memória compartilhada no mesmo espaço de endereço. O uso desta
|
||
diretiva permite que os erros "Unable to reattach to base address" sejam
|
||
corrigidos.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.restrict-api">
|
||
<term>
|
||
<parameter>opcache.restrict_api</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Permite chamar funções da API do OPcache apenas de scripts PHP cujo caminho
|
||
é iniciado a partir da string especificada. O padrão <literal>""</literal>
|
||
significa nenhuma restrição.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.file_update_protection">
|
||
<term>
|
||
<parameter>opcache.file_update_protection</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Impede o armazenamento em cache de arquivos que tenham menos de um determinado número de segundos desde a última modificação.
|
||
Isso protege contra o armazenamento em cache de arquivos que tenham sido atualizados de forma incompleta. Caso todas as
|
||
atualizações forem atômicas, o desempenho pode ser aumentado definindo isso como <literal>0</literal>.
|
||
Isso permitirá que os arquivos sejam armazenados em cache imediatamente.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.huge_code_pages">
|
||
<term>
|
||
<parameter>opcache.huge_code_pages</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Ativa ou desativa a cópia do código PHP (segmento de texto) em PÁGINAS ENORMES.
|
||
Isso deve melhorar o desempenho, mas requer configuração de sistema operacional apropriada.
|
||
Disponível no Linux a partir do PHP 7.0.0 e no FreeBSD a partir do PHP 7.4.0.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.lockfile_path">
|
||
<term>
|
||
<parameter>opcache.lockfile_path</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Caminho absoluto usado para armazenar arquivos de bloqueio compartilhados (somente para * nix)
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.opt_debug_level">
|
||
<term>
|
||
<parameter>opcache.opt_debug_level</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Produz opcode dumps para depurar diferentes estágios de otimizações.
|
||
0x10000 produzirá opcodes conforme o compilador os produziu antes que qualquer otimização ocorra,
|
||
enquanto 0x20000 produzirá códigos otimizados.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.file-cache">
|
||
<term>
|
||
<parameter>opcache.file_cache</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Ativa e define o diretório de cache de segundo nível. Ele deve melhorar
|
||
o desempenho quando a memória SHM estiver cheia, na reinicialização do servidor ou
|
||
na reinicialização do SHM. O padrão <literal>""</literal> desativa o cache baseado em arquivo.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.file-cache-only">
|
||
<term>
|
||
<parameter>opcache.file_cache_only</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Ativa ou desativa o armazenamento em cache opcode na memória compartilhada.
|
||
</simpara>
|
||
<note>
|
||
<simpara>
|
||
Antes do PHP 8.1.0, desabilitar esta diretiva com um cache de arquivo já preenchido
|
||
era necessário para limpar manualmente o cache de arquivo.
|
||
</simpara>
|
||
</note>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.file-cache-consistency-checks">
|
||
<term>
|
||
<parameter>opcache.file_cache_consistency_checks</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Ativa ou desativa a validação da soma de verificação quando o script é carregado do cache do arquivo.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.file-cache-fallback">
|
||
<term>
|
||
<parameter>opcache.file_cache_fallback</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Implica em <code>opcache.file_cache_only=1</code> para um determinado processo que
|
||
falhou ao se reconectar à memória compartilhada (somente para Windows). É necessário habilitar
|
||
explicitamente o cache de arquivos.
|
||
</simpara>
|
||
<caution>
|
||
<simpara>
|
||
Desativar esta opção de configuração pode impedir que os processos sejam iniciados
|
||
e, portanto, é desencorajado.
|
||
</simpara>
|
||
</caution>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.validate-permission">
|
||
<term>
|
||
<parameter>opcache.validate_permission</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Valida as permissões do arquivo em cache no usuário atual.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.validate-root">
|
||
<term>
|
||
<parameter>opcache.validate_root</parameter>
|
||
<type>bool</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Evita colisões de nomes em ambientes chroot'ed. Isso deve ser ativado em
|
||
todos os ambientes chroot'ed para impedir o acesso a arquivos fora do chroot.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.preload">
|
||
<term>
|
||
<parameter>opcache.preload</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Especifica um script PHP que será compilado e executado na inicialização do servidor
|
||
e que pode pré-carregar outros arquivos, seja por <function>include</function>ing ou usando
|
||
a função <function>opcache_compile_file</function>. Todas as entidades (por exemplo,
|
||
funções e classes) definidas nesses arquivos estarão disponíveis para solicitações prontas
|
||
para uso, até que o servidor seja desligado.
|
||
</simpara>
|
||
<note>
|
||
<simpara>
|
||
O pré-carregamento não é suportado no Windows.
|
||
</simpara>
|
||
</note>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.preload-user">
|
||
<term>
|
||
<parameter>opcache.preload_user</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Permite que o pré-carregamento seja executado como o usuário do sistema especificado. Isso é útil
|
||
para servidores que inicializam como root antes de alternar para um usuário de sistema sem privilégios.
|
||
O pré-carregamento como root não é permitido por padrão por motivos de segurança,
|
||
a menos que esta diretiva seja explicitamente definida como <literal>root</literal>.
|
||
A partir do PHP 8.3.0, esta diretiva não precisa ser definida para permitir pré-carregamento quando
|
||
executado como root ao usar o &cli.sapi; ou o <link linkend="book.phpdbg">SAPI phpdbg</link>.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.cache-id">
|
||
<term>
|
||
<parameter>opcache.cache_id</parameter>
|
||
<type>string</type>
|
||
</term>
|
||
<listitem>
|
||
<para>
|
||
No Windows, todos os processos executando o mesmo <acronym>PHP</acronym> <acronym>SAPI</acronym>
|
||
na mesma conta de usuário com o mesmo ID de cache compartilham uma única instância do OPcache.
|
||
O valor do cache ID pode ser escolhido livremente.
|
||
</para>
|
||
<tip>
|
||
<simpara>
|
||
Para IIS, diferentes pools de aplicativos podem ter sua própria instância OPcache
|
||
usando a variável de ambiente <envar>APP_POOL_ID</envar> como
|
||
<parameter>opcache.cache_id</parameter>.
|
||
</simpara>
|
||
</tip>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit">
|
||
<term>
|
||
<parameter>opcache.jit</parameter>
|
||
<type class="union"><type>string</type><type>int</type></type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Para uso típico, esta opção aceita um dos quatro valores de string:
|
||
</simpara>
|
||
<simplelist>
|
||
<member><literal>disable</literal>: Completamente desativado, não pode ser ativado em tempo de execução.</member>
|
||
<member><literal>off</literal>: Desativado, mas pode ser ativado em tempo de execução.</member>
|
||
<member>
|
||
<literal>tracing</literal>/<literal>on</literal>:Use rastreamento JIT.
|
||
Ativado por padrão e recomendado para a maioria dos usuários.
|
||
</member>
|
||
<member><literal>function</literal>: Use function JIT.</member>
|
||
</simplelist>
|
||
<para>
|
||
Para uso avançado, esta opção aceita um <literal>CRTO</literal> inteiro de 4 dígitos, onde os dígitos significam:
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><literal>C</literal> (CPU-sinalizadores de otimização específicos)</term>
|
||
<listitem>
|
||
<simplelist>
|
||
<member><literal>0</literal>: Desative a otimização específica da CPU.</member>
|
||
<member><literal>1</literal>: Habilite o uso do AVX, se a CPU for compatível.</member>
|
||
</simplelist>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><literal>R</literal> (alocação de registro)</term>
|
||
<listitem>
|
||
<simplelist>
|
||
<member><literal>0</literal>: Não execute alocação de registro.</member>
|
||
<member><literal>1</literal>: Execute a alocação de registrador local de bloco.</member>
|
||
<member><literal>2</literal>: Execute a alocação global de registradores.</member>
|
||
</simplelist>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><literal>T</literal> (gatilho(trigger))</term>
|
||
<listitem>
|
||
<simplelist>
|
||
<member><literal>0</literal>: Compile todas as funções no carregamento do script.</member>
|
||
<member><literal>1</literal>: Compile funções na primeira execução.</member>
|
||
<member>
|
||
<literal>2</literal>: Funções de perfil no primeiro pedido e compilação das funções mais
|
||
quentes depois.
|
||
</member>
|
||
<member><literal>3</literal>: Crie perfis em tempo real e compile funções importantes.</member>
|
||
<member><literal>4</literal>: Atualmente sem uso.</member>
|
||
<member>
|
||
<literal>5</literal>: Use tracing JIT. Crie perfis em tempo real e
|
||
compile rastreamentos para segmentos de código dinâmico.
|
||
</member>
|
||
</simplelist>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><literal>O</literal> (nível de otimização)</term>
|
||
<listitem>
|
||
<simplelist>
|
||
<member><literal>0</literal>: Sem JIT.</member>
|
||
<member><literal>1</literal>: JIT mínimo (chamada de manipuladores de VM padrão).</member>
|
||
<member><literal>2</literal>: Manipuladores de VM embutidos.</member>
|
||
<member><literal>3</literal>: Use inferência de tipo.</member>
|
||
<member><literal>4</literal>: Usar gráfico de chamada.</member>
|
||
<member><literal>5</literal>: Otimize todo o script.</member>
|
||
</simplelist>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
O modo <literal>"tracing"</literal> corresponde a <code>CRTO = 1254</code>,
|
||
o modo <literal>"function"</literal> corresponde a <code>CRTO = 1205</code>.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-buffer-size">
|
||
<term>
|
||
<parameter>opcache.jit_buffer_size</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
A quantidade de memória compartilhada a ser reservada para o código JIT compilado. Um valor zero desativa o JIT.
|
||
</simpara>
|
||
&ini.shorthandbytes;
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-debug">
|
||
<term>
|
||
<parameter>opcache.jit_debug</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Uma máscara de bits especificando qual saída de depuração JIT habilitar.
|
||
Para possíveis valores, consulte
|
||
<link xlink:href="&url.php.git.src.master.view;ext/opcache/jit/zend_jit.h">zend_jit.h</link>
|
||
(procure por definições de macro começando com <code>ZEND_JIT_DEBUG</code>).
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-bisect-limit">
|
||
<term>
|
||
<parameter>opcache.jit_bisect_limit</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Opção de depuração que desativa a compilação JIT após a compilação de um determinado número de funções.
|
||
Isso pode ser útil para dividir a origem de um erro de compilação JIT. Observação: esta opção só funciona
|
||
quando o gatilho JIT é definido como 0 (compilar no carregamento do script) ou 1 (compilar na primeira execução),
|
||
por exemplo, <code>opcache.jit=1215</code>. Veja mais na opção <link linkend="ini.opcache.jit">opcache.jit</link>.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-prof-threshold">
|
||
<term>
|
||
<parameter>opcache.jit_prof_threshold</parameter>
|
||
<type>float</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Ao usar o modo de trigger "profile on first request", esse limite determina se uma
|
||
função é considerada ativa. O número de chamadas para a função dividido pelo número de chamadas
|
||
para todas as funções deve estar acima do limite. Por exemplo, um limite de 0,005 significa que as
|
||
funções que representam mais de 0,5% de todas as chamadas serão compiladas por JIT.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-root-traces">
|
||
<term>
|
||
<parameter>opcache.jit_max_root_traces</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de root traces. O root trace é um fluxo de execução que percorre primeiro um
|
||
caminho através do código, que é uma unidade de compilação JIT. O JIT não compilará o novo código se atingir esse limite.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-side-traces">
|
||
<term>
|
||
<parameter>opcache.jit_max_side_traces</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de side traces que um root trace pode ter. O side trace é outro fluxo de execução
|
||
que não segue o caminho do root trace compilado. Os sides traces pertencentes ao mesmo
|
||
root trace não serão compilados se atingirem esse limite.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-exit-counters">
|
||
<term>
|
||
<parameter>opcache.jit_max_exit_counters</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de contadores de saída de side trace. Isso limita o número total de side traces
|
||
que podem existir, em todos os root traces.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-hot-loop">
|
||
<term>
|
||
<parameter>opcache.jit_hot_loop</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Depois de quantas iterações um laço é considerado ativo.
|
||
O intervalo de valores válidos é <code>[0,255]</code>; para qualquer configuração fora desse intervalo,
|
||
por exemplo, <literal>-1</literal> ou <literal>256</literal>, o valor padrão será usado.
|
||
O valor <literal>0</literal> desabilitará o JIT para rastrear ou compilar quaisquer laços.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-hot-func">
|
||
<term>
|
||
<parameter>opcache.jit_hot_func</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Depois de quantas chamadas uma função é considerada ativa.
|
||
O intervalo de valores válidos é <code>[0,255]</code>; para qualquer configuração fora desse intervalo,
|
||
por exemplo, <literal>-1</literal> ou <literal>256</literal>, o valor padrão será usado.
|
||
O valor <literal>0</literal> desabilitará o JIT para rastrear e compilar quaisquer funções.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-hot-return">
|
||
<term>
|
||
<parameter>opcache.jit_hot_return</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Depois de quantos retornos, um retorno é considerado ativo.
|
||
O intervalo de valores válidos é <code>[0,255]</code>; para qualquer configuração fora desse intervalo,
|
||
por exemplo, <literal>-1</literal> ou <literal>256</literal>, o valor padrão será usado.
|
||
O valor <literal>0</literal> desabilitará o JIT para rastrear e compilar quaisquer retornos.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-hot-side-exit">
|
||
<term>
|
||
<parameter>opcache.jit_hot_side_exit</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Depois de quantas saídas uma saída secundária é considerada ativa.
|
||
O intervalo de valores válidos é <code>[0,255]</code>; para qualquer configuração fora desse intervalo,
|
||
por exemplo, <literal>-1</literal> ou <literal>256</literal>, o valor padrão será usado.
|
||
O valor zero <literal>0</literal> desabilitará o JIT para rastrear e compilar quaisquer saídas secundárias.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-blacklist-root-trace">
|
||
<term>
|
||
<parameter>opcache.jit_blacklist_root_trace</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de vezes que a compilação de um root trace é tentada antes de ser incluída na blacklist.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-blacklist-side-trace">
|
||
<term>
|
||
<parameter>opcache.jit_blacklist_side_trace</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de vezes que a compilação de um side trace é tentada antes de ser incluída na blacklist.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-loop-unrolls">
|
||
<term>
|
||
<parameter>opcache.jit_max_loop_unrolls</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de tentativas de resolver um loop em um traço lateral,
|
||
tentando alcançar o root trace e fechar o loop externo.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-recursive-calls">
|
||
<term>
|
||
<parameter>opcache.jit_max_recursive_calls</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de loops de chamada recursiva.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-recursive-return">
|
||
<term>
|
||
<parameter>opcache.jit_max_recursive_returns</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de loops de retorno recursivos.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry xml:id="ini.opcache.jit-max-polymorphic-calls">
|
||
<term>
|
||
<parameter>opcache.jit_max_polymorphic_calls</parameter>
|
||
<type>int</type>
|
||
</term>
|
||
<listitem>
|
||
<simpara>
|
||
Número máximo de tentativas de chamadas polimórficas (dinâmicas ou de método) embutidas.
|
||
As chamadas acima desse limite são tratadas como megamórficas e não são embutidas.
|
||
</simpara>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</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
|
||
-->
|