<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/opcache.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'opcache.configuration.php',
    1 => '运行时配置',
    2 => '运行时配置',
  ),
  'up' => 
  array (
    0 => 'opcache.setup.php',
    1 => '安装/配置',
  ),
  'prev' => 
  array (
    0 => 'opcache.installation.php',
    1 => '安装',
  ),
  'next' => 
  array (
    0 => 'opcache.preloading.php',
    1 => '预加载',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/opcache/ini.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="opcache.configuration" class="sect1">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>OPcache 配置选项</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.enable" class="link">opcache.enable</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.enable-cli" class="link">opcache.enable_cli</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>在 PHP 7.1.2 至 7.1.6（含）的版本，默认值是 <code class="literal">1</code></td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.memory-consumption" class="link">opcache.memory_consumption</a></td>
      <td>128</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.interned-strings-buffer" class="link">opcache.interned_strings_buffer</a></td>
      <td>8</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.max-accelerated-files" class="link">opcache.max_accelerated_files</a></td>
      <td>10000</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.max-wasted-percentage" class="link">opcache.max_wasted_percentage</a></td>
      <td>5</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.use-cwd" class="link">opcache.use_cwd</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.validate-timestamps" class="link">opcache.validate_timestamps</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.revalidate-freq" class="link">opcache.revalidate_freq</a></td>
      <td>2</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.revalidate-path" class="link">opcache.revalidate_path</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.save-comments" class="link">opcache.save_comments</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.fast-shutdown" class="link">opcache.fast_shutdown</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>从 PHP 7.2.0 开始被移除</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.enable-file-override" class="link">opcache.enable_file_override</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.optimization-level" class="link">opcache.optimization_level</a></td>
      <td>0x7FFEBFFF</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>从 PHP 7.3.0 起修改为 <code class="literal">0x7FFFBFFF</code></td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.inherited-hack" class="link">opcache.inherited_hack</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 7.3.0 被移除</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.dups-fix" class="link">opcache.dups_fix</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.blacklist-filename" class="link">opcache.blacklist_filename</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.max-file-size" class="link">opcache.max_file_size</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.consistency-checks" class="link">opcache.consistency_checks</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 8.1.18 和 8.2.5 起禁用。从 PHP 8.3.0 起已删除。</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.force-restart-timeout" class="link">opcache.force_restart_timeout</a></td>
      <td>180</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.error-log" class="link">opcache.error_log</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.log-verbosity-level" class="link">opcache.log_verbosity_level</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.record-warnings" class="link">opcache.record_warnings</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.preferred-memory-model" class="link">opcache.preferred_memory_model</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.protect-memory" class="link">opcache.protect_memory</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.mmap-base" class="link">opcache.mmap_base</a></td>
      <td><strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>仅限 Windows。</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.restrict-api" class="link">opcache.restrict_api</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.file_update_protection" class="link">opcache.file_update_protection</a></td>
      <td>2</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.huge_code_pages" class="link">opcache.huge_code_pages</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.lockfile_path" class="link">opcache.lockfile_path</a></td>
      <td>&quot;/tmp&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.opt_debug_level" class="link">opcache.opt_debug_level</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 7.1.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.file-cache" class="link">opcache.file_cache</a></td>
      <td><strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.file-cache-only" class="link">opcache.file_cache_only</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.file-cache-consistency-checks" class="link">opcache.file_cache_consistency_checks</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.file-cache-fallback" class="link">opcache.file_cache_fallback</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>仅适用于 Windows 平台</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.validate-permission" class="link">opcache.validate_permission</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>从 PHP 7.0.14 开始支持</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.validate-root" class="link">opcache.validate_root</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>从 PHP 7.0.14 开始支持</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.preload" class="link">opcache.preload</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>从 PHP 7.4.0 开始支持</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>从 PHP 7.4.0 开始支持</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.cache-id" class="link">opcache.cache_id</a></td>
      <td>&quot;&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>仅支持 Windows。自 PHP 7.4.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit" class="link">opcache.jit</a></td>
      <td>&quot;disable&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效，PHP 8.4.0 之前，默认值为“tracing”。</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-buffer-size" class="link">opcache.jit_buffer_size</a></td>
      <td>64M</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效，PHP 8.4.0 之前，默认值为 0。</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-debug" class="link">opcache.jit_debug</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-bisect-limit" class="link">opcache.jit_bisect_limit</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-prof-threshold" class="link">opcache.jit_prof_threshold</a></td>
      <td>0.005</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-root-traces" class="link">opcache.jit_max_root_traces</a></td>
      <td>1024</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-side-traces" class="link">opcache.jit_max_side_traces</a></td>
      <td>128</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-exit-counters" class="link">opcache.jit_max_exit_counters</a></td>
      <td>8192</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-hot-loop" class="link">opcache.jit_hot_loop</a></td>
      <td>64</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-hot-func" class="link">opcache.jit_hot_func</a></td>
      <td>127</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-hot-return" class="link">opcache.jit_hot_return</a></td>
      <td>8</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-hot-side-exit" class="link">opcache.jit_hot_side_exit</a></td>
      <td>8</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-blacklist-root-trace" class="link">opcache.jit_blacklist_root_trace</a></td>
      <td>16</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-blacklist-side-trace" class="link">opcache.jit_blacklist_side_trace</a></td>
      <td>8</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-loop-unrolls" class="link">opcache.jit_max_loop_unrolls</a></td>
      <td>8</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-recursive-calls" class="link">opcache.jit_max_recursive_calls</a></td>
      <td>2</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-recursive-return" class="link">opcache.jit_max_recursive_returns</a></td>
      <td>2</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

     <tr>
      <td><a href="opcache.configuration.php#ini.opcache.jit-max-polymorphic-calls" class="link">opcache.jit_max_polymorphic_calls</a></td>
      <td>2</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td>自 PHP 8.0.0 起有效</td>
     </tr>

    </tbody>
   
  </table>

  有关 INI_* 样式的更多详情与定义，见 <a href="configuration.changes.modes.php" class="xref">配置可被设定范围</a>。
 </p>

 <p class="para">这是配置指令的简短说明。</p>

 <dl>
  
   <dt id="ini.opcache.enable">
    <code class="parameter">opcache.enable</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     启用操作码缓存。如果禁用此选项，则不会优化和缓存代码。
     在运行期使用 <span class="function"><a href="function.ini-set.php" class="function">ini_set()</a></span> 函数只能禁用
     <code class="literal">opcache.enable</code> 设置，不可以启用此设置。
     如果在脚本中尝试启用此设置项会产生警告。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.enable-cli">
    <code class="parameter">opcache.enable_cli</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     仅针对 CLI 版本的 PHP 启用操作码缓存。
     通常被用来测试和调试。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.memory-consumption">
    <code class="parameter">opcache.memory_consumption</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     OPcache 的共享内存大小，以兆字节为单位。最小允许值为
     <code class="literal">&quot;8&quot;</code>。如果设置的值小于最小值，则强制设置为允许的最小值。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.interned-strings-buffer">
    <code class="parameter">opcache.interned_strings_buffer</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     用来存储预留字符串的内存大小，以 MB 为单位。最大值在 64 位架构上为 32767，在 32 位架构上为 4095。
    </span>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <span class="simpara">
      PHP 8.4.0 之前，所有架构上的最大值都是 4095 MB。
     </span>
    </p></blockquote>
   </dd>
  
  
   <dt id="ini.opcache.max-accelerated-files">
    <code class="parameter">opcache.max_accelerated_files</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     OPcache 哈希表中可存储的脚本文件数量上限。真实的取值是在质数集合<code class="literal">{
     223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793
     }</code> 中找到的第一个大于等于设置值的质数。设置值取值范围最小值是
     200，最大值是 1000000。超出范围的值将限制为允许的值。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.max-wasted-percentage">
    <code class="parameter">opcache.max_wasted_percentage</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果可用内存不足，在计划重新启动之前，允许浪费的最大内存百分比。最大允许值是
     <code class="literal">&quot;50&quot;</code>，如果设置了更大的值，则强制设置为允许的最大值。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.use-cwd">
    <code class="parameter">opcache.use_cwd</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果启用，OPcache 将在哈希表的脚本键之后附加改脚本的工作目录，
     以避免同名脚本冲突的问题。
     禁用此选项可以提高性能，但是可能会导致应用崩溃。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.validate-timestamps">
    <code class="parameter">opcache.validate_timestamps</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <p class="para">
     如果启用，那么 OPcache 会每隔 <a href="opcache.configuration.php#ini.opcache.revalidate-freq" class="link">opcache.revalidate_freq</a> 设定的秒数
     检查脚本是否更新。
     如果禁用此选项，你必须使用 <span class="function"><a href="function.opcache-reset.php" class="function">opcache_reset()</a></span> 或者
     <span class="function"><a href="function.opcache-invalidate.php" class="function">opcache_invalidate()</a></span> 函数来手动重置 OPcache，也可以
     通过重启 Web 服务器来使文件系统更改生效。
     <blockquote class="note"><p><strong class="note">注意</strong>: 
      <span class="simpara">
       如果将 <a href="opcache.configuration.php#ini.opcache.file_update_protection" class="link">opcache.file_update_protection</a> 或
       <a href="opcache.configuration.php#ini.opcache.max-file-size" class="link">opcache.max_file_size</a> 选项设置为非零值，OPcache
       仍可能在编译时验证文件的时间戳。
      </span>
     </p></blockquote>
    </p>
   </dd>
  
  
   <dt id="ini.opcache.revalidate-freq">
    <code class="parameter">opcache.revalidate_freq</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     检查脚本时间戳是否有更新的周期，以秒为单位。
     设置为 <code class="literal">0</code> 会导致针对每个请求， OPcache 都会检查脚本更新。
    </span>
    <span class="simpara">
     如果
     <a href="opcache.configuration.php#ini.opcache.validate-timestamps" class="link">opcache.validate_timestamps</a>
     配置指令设置为禁用，那么此设置项将会被忽略。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.revalidate-path">
    <code class="parameter">opcache.revalidate_path</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果禁用此选项，在同一个 <a href="ini.core.php#ini.include-path" class="link">include_path</a>
     已存在的缓存文件会被重用。
     因此，将无法找到不在包含路径下的同名文件。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.save-comments">
    <code class="parameter">opcache.save_comments</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果禁用，脚本文件中的注释内容将不会被包含到操作码缓存文件，
     这样可以有效减小优化后的文件体积。
     禁用此配置指令可能会导致一些依赖注释或注解的
     应用或框架无法正常工作，
     比如： Doctrine， Zend Framework 2 以及 PHPUnit。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.fast-shutdown">
    <code class="parameter">opcache.fast_shutdown</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果启用，则会使用快速停止续发事件。
     所谓快速停止续发事件是指依赖 Zend 引擎的内存管理模块
     一次释放全部请求变量的内存，而不是依次释放每一个已分配的内存块。
    </span>
    <span class="simpara">
     从 PHP 7.2.0 开始，此配置指令被移除。
     快速停止的续发事件的处理已经集成到 PHP 中，
     只要有可能，PHP 会自动处理这些续发事件。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.enable-file-override">
    <code class="parameter">opcache.enable_file_override</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果启用，则在调用函数 <span class="function"><a href="function.file-exists.php" class="function">file_exists()</a></span>，
     <span class="function"><a href="function.is-file.php" class="function">is_file()</a></span> 以及 <span class="function"><a href="function.is-readable.php" class="function">is_readable()</a></span> 的时候，
     都会检查操作码缓存，无论文件是否已经被缓存。
     如果应用中包含检查 PHP 脚本存在性和可读性的功能，这样可以提升性能。
     但是如果禁用了 <a href="opcache.configuration.php#ini.opcache.validate-timestamps" class="link">opcache.validate_timestamps</a> 选项，
     可能存在返回过时数据的风险。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.optimization-level">
    <code class="parameter">opcache.optimization_level</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     控制执行哪些优化的二进制位掩码。默认是应用所有安全优化。更改默认值对于调试/开发优化器非常有用（参见
     <a href="opcache.configuration.php#ini.opcache.opt_debug_level" class="link">opcache.opt_debug_level</a>）。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.inherited-hack">
    <code class="parameter">opcache.inherited_hack</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
     <span class="simpara">
      该配置指令已被忽略。
     </span>
   </dd>
  
  
   <dt id="ini.opcache.dups-fix">
    <code class="parameter">opcache.dups_fix</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     仅作为针对 “不可重定义类”错误的一种解决方案。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.blacklist-filename">
    <code class="parameter">opcache.blacklist_filename</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     OPcache 黑名单文件位置。
     黑名单文件为文本文件，包含了不进行预编译优化的文件名，每行一个文件名。
     黑名单中的文件名可以使用通配符，也可以使用前缀。
     此文件中以分号（;）开头的行将被视为注释。
    </span>
    <span class="simpara">
     简单的黑名单文件可能如下所示：
    </span>
    <div class="informalexample">
     <div class="example-contents">
<div class="cdata"><pre>
; 将特定文件加入到黑名单
/var/www/broken.php
; 以字符 x 文件打头的文件
/var/www/x
; 通配符匹配
/var/www/*-broken.php
</pre></div>
     </div>

    </div>
   </dd>
  
  
   <dt id="ini.opcache.max-file-size">
    <code class="parameter">opcache.max_file_size</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     以字节为单位的缓存的文件大小上限。设置为
     <code class="literal">0</code> 表示缓存全部文件。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.consistency-checks">
    <code class="parameter">opcache.consistency_checks</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果是非 0 值，OPcache 将会每隔 N 次请求检查缓存校验和。
     N 即为此配置指令的设置值。
     由于此选项对于性能有较大影响，请尽在调试环境使用。
    </span>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <span class="simpara">
      自 8.1.18 和 8.2.5 起禁用。从 PHP 8.3.0 起已删除。
     </span>
    </p></blockquote>
   </dd>
  
  
   <dt id="ini.opcache.force-restart-timeout">
    <code class="parameter">opcache.force_restart_timeout</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果缓存处于非激活状态，等待多少秒之后计划重启。
     如果超出了设定时间，则 OPcache 模块将杀除持有缓存锁的进程，
     并进行重启。
    </span>
    <span class="simpara">
     如果选项
     <a href="opcache.configuration.php#ini.opcache.log-verbosity-level" class="link">opcache.log_verbosity_level</a>
     设置为 2 或者 2 以上的数值，当发生重启时将在日志中记录一条警告信息。
    </span>
    <span class="simpara">
     Windows 不支持该指令。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.error-log">
    <code class="parameter">opcache.error_log</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     OPcache 模块的错误日志文件。
     如果留空，则视为 <code class="literal">stderr</code>，
     错误日志将被送往标准错误输出 （通常情况下是 Web 服务器的错误日志文件）。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.log-verbosity-level">
    <code class="parameter">opcache.log_verbosity_level</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     OPcache 模块的日志级别。
     默认情况下，仅有致命级别（0）及错误级别（1）的日志会被记录。
     其他可用的级别有：警告（2），信息（3）和调试（4）。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.record-warnings">
    <code class="parameter">opcache.record_warnings</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果启用，OPcache 将记录编译时警告并在下次对其重播，即使是从缓存中提供的。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.preferred-memory-model">
    <code class="parameter">opcache.preferred_memory_model</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     OPcache 首选的内存模块。
     如果留空，OPcache 会选择适用的模块，
     通常情况下，自动选择就可以满足需求。
    </span>
    <span class="simpara">
     可选值包括： <code class="literal">mmap</code>，<code class="literal">shm</code>,
     <code class="literal">posix</code> 以及 <code class="literal">win32</code>。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.protect-memory">
    <code class="parameter">opcache.protect_memory</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     保护共享内存，以避免执行脚本时发生非预期的写入。
     仅用于内部调试。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.mmap-base">
    <code class="parameter">opcache.mmap_base</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     在 Windows 平台上共享内存段的基地址。
     所有的 PHP 进程都将共享内存映射到同样的地址空间。
     使用此配置指令避免“无法重新附加到基地址”的错误。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.restrict-api">
    <code class="parameter">opcache.restrict_api</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     仅允许路径是以指定字符串开始的 PHP 脚本调用 OPcache API 函数。
     默认值为空字符串 <code class="literal">&quot;&quot;</code>，表示不做限制。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.file_update_protection">
    <code class="parameter">opcache.file_update_protection</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     如果文件的最后修改时间距现在不足此项配置指令所设定的秒数，那么这个文件不会进入到缓存中。
     这是为了防止尚未完全修改完毕的文件进入到缓存。如果所有文件更新都是原子的，则可以通过将其设置为
     <code class="literal">0</code> 来提高性能。这将允许文件立即缓存。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.huge_code_pages">
    <code class="parameter">opcache.huge_code_pages</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     启用或者禁用将 PHP 代码（文本段）拷贝到 HUGE PAGES 中。这应该会提高性能，但是需要适当的
     OS 配置。自 PHP 7.0.0 起可在 Linux 上使用，自 PHP 7.4.0 上可在 FreeBSD 上使用。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.lockfile_path">
    <code class="parameter">opcache.lockfile_path</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     用来存储共享锁文件的绝对路径（仅适用于 *nix 操作系统）。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.opt_debug_level">
    <code class="parameter">opcache.opt_debug_level</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     出于对不同阶段的优化情况进行调试的目的，生成操作码转储。
     设置为 0x10000 会在进行优化之前输出编译器编译后的操作码，
     设置为 0x20000 会输出优化后的操作码。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.file-cache">
    <code class="parameter">opcache.file_cache</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     配置二级缓存目录并启用二级缓存。
     启用二级缓存可以在 SHM 内存满了、服务器重启或者重置 SHM 的时候提高性能。
     默认值为空字符串 <code class="literal">&quot;&quot;</code>，表示禁用基于文件的缓存。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.file-cache-only">
    <code class="parameter">opcache.file_cache_only</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     启用或禁用在共享内存中的 opcode 缓存。
    </span>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <span class="simpara">
      在 PHP 8.1.0 之前，已经存在文件缓存时禁用此指令需要手动清除文件缓存。
     </span>
    </p></blockquote>
   </dd>
  
  
   <dt id="ini.opcache.file-cache-consistency-checks">
    <code class="parameter">opcache.file_cache_consistency_checks</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     当从文件缓存中加载脚本的时候，是否对文件的校验和进行验证。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.file-cache-fallback">
    <code class="parameter">opcache.file_cache_fallback</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     在 Windows 平台上，当一个进程无法附加到共享内存的时候，
     使用基于文件的缓存，也即：<code class="code">opcache.file_cache_only=1</code>。
     需要显示的启用文件缓存。
    </span>
    <div class="caution"><strong class="caution">警告</strong>
     <p class="simpara">
      不鼓励禁用此配置项，
      禁用它可能会导致进程无法启动。
     </p>
    </div>
   </dd>
  
  
   <dt id="ini.opcache.validate-permission">
    <code class="parameter">opcache.validate_permission</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     针对当前用户，验证缓存文件的访问权限。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.validate-root">
    <code class="parameter">opcache.validate_root</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <span class="simpara">
     在 chroot 的环境中避免命名冲突。
     为了防止进程访问到 chroot 环境之外的文件，应该在 chroot 的情况下启用这个选项。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.preload">
    <code class="parameter">opcache.preload</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     指定要在服务器启动时期进行编译和缓存的 PHP 脚本文件，
     这些文件也可能通过 <span class="function"><a href="function.include.php" class="function">include</a></span> 或者 <span class="function"><a href="function.opcache-compile-file.php" class="function">opcache_compile_file()</a></span> 函数
     来预加载其他文件。
     所有这些文件中包含的实体，包括函数、类等，在服务器启动的时候就被加载和缓存，
     对于用户代码来讲是“开箱可用”的。
    </span>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <span class="simpara">
      Windows 不支持预加载。
     </span>
    </p></blockquote>
   </dd>
  
  
   <dt id="ini.opcache.preload-user">
    <code class="parameter">opcache.preload_user</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <span class="simpara">
     预加载以指定系统用户身份运行。这对于切换到非特权系统用户之前以 root
     身份启动的服务器很有用。考虑到安全因素，默认禁止以 root
     身份预加载代码，除非该指令明确设置为 <code class="literal">root</code>。自
     PHP 8.3.0 起，当使用 <abbr title="Command Line Interpreter/Interface">CLI</abbr> <abbr title="Server Application Programming Interface">SAPI</abbr> 或 <a href="book.phpdbg.php" class="link">phpdbg
     SAPI</a> 以 root 身份运行时，无需设置此指令即可允许预加载。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.cache-id">
    <code class="parameter">opcache.cache_id</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     在 Windwos 上，运行在相同 <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> <abbr title="Server Application Programming Interface">SAPI</abbr> 且相同的用户账户使用相同缓存 ID
     上的所有进程，会共享单个 OPcache 实例。缓存 ID 的值可以自由选择。
    </p>
    <div class="tip"><strong class="tip">小技巧</strong>
     <p class="simpara">
      对于 IIS，使用环境变量 <var class="envar">APP_POOL_ID</var> 作为
      <code class="parameter">opcache.cache_id</code>，可以让不同的应用池拥有自己的 OPcache 实例。
     </p>
    </div>
   </dd>
  
  
   <dt id="ini.opcache.jit">
    <code class="parameter">opcache.jit</code>
    <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span>
   </dt>
   <dd>
    <span class="simpara">
     针对经典用法，此选项接受以下四个字符串值之一：
    </span>
    <ul class="simplelist">
     <li><code class="literal">disable</code>：完全禁用，无法在运行时启用。</li>
     <li><code class="literal">off</code>：禁用，但可以在运行时启用。</li>
     <li>
      <code class="literal">tracing</code>/<code class="literal">on</code>：使用追踪 JIT。默认启用并推荐给大部分用户。
     </li>
     <li><code class="literal">function</code>：使用函数 JIT。</li>
    </ul>
    <p class="para">
     针对高级用法，此选项接受 4 位整数 <code class="literal">CRTO</code>，其中的位分别是：
     <dl>
      
       <dt><code class="literal">C</code>（特定 CPU 优化 flag）</dt>
       <dd>
        <ul class="simplelist">
         <li><code class="literal">0</code>：禁用特定 CPU 优化。</li>
         <li><code class="literal">1</code>：如果 CPU 支持则启用 AVX。</li>
        </ul>
       </dd>
      
      
       <dt><code class="literal">R</code>（寄存器分配）</dt>
       <dd>
        <ul class="simplelist">
         <li><code class="literal">0</code>：不执行寄存器分配。</li>
         <li><code class="literal">1</code>：执行局部域寄存器分配。</li>
         <li><code class="literal">2</code>：执行全局寄存器分配。</li>
        </ul>
       </dd>
      
      
       <dt><code class="literal">T</code>（触发）</dt>
       <dd>
        <ul class="simplelist">
         <li><code class="literal">0</code>: 在脚本加载时编译所有函数。</li>
         <li><code class="literal">1</code>: 在第一次执行时编译函数。</li>
         <li>
          <code class="literal">2</code>：第一次请求时分析函数，然后编译最热门函数。
         </li>
         <li><code class="literal">3</code>：动态分析和编译热门函数。</li>
         <li><code class="literal">4</code>：目前未使用。</li>
         <li>
          <code class="literal">5</code>：使用追踪 JIT。动态分析和为热门代码段编译追踪。
         </li>
        </ul>
       </dd>
      
      
       <dt><code class="literal">O</code>（优化级别）</dt>
       <dd>
        <ul class="simplelist">
         <li><code class="literal">0</code>：不 JIT。</li>
         <li><code class="literal">1</code>：最小 JIT（调用标准 VM 处理程序）。</li>
         <li><code class="literal">2</code>：内联 VM 处理程序。</li>
         <li><code class="literal">3</code>：使用类型推断。</li>
         <li><code class="literal">4</code>：使用调用图。</li>
         <li><code class="literal">5</code>：优化整个脚本。</li>
        </ul>
       </dd>
      
     </dl>
     <code class="literal">&quot;tracing&quot;</code> 模式对应 <code class="code">CRTO = 1254</code>，<code class="literal">&quot;function&quot;</code>
     模式对应 <code class="code">CRTO = 1205</code>。
    </p>
   </dd>
  
  
   <dt id="ini.opcache.jit-buffer-size">
    <code class="parameter">opcache.jit_buffer_size</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     为编译 JIT 代码保留的共享内存量。值 0 表示禁用 JIT。
    </span>
    <span class="simpara">当使用 <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
时, 其值以字节来衡量。还可以使用在 <a href="faq.using.php#faq.using.shorthandbytes" class="link">FAQ</a> 中描述的速记符。</span>
   </dd>
  
  
   <dt id="ini.opcache.jit-debug">
    <code class="parameter">opcache.jit_debug</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     指定位掩码，用于启动哪个 JIT 调试输出。参阅 <a href="https://github.com/php/php-src/blob/master/ext/opcache/jit/zend_jit.h" class="link external">&raquo;&nbsp;zend_jit.h</a>
    （搜索以 <code class="code">ZEND_JIT_DEBUG</code> 开头的宏定义）。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-bisect-limit">
    <code class="parameter">opcache.jit_bisect_limit</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     调试选项，在编译一定数量的函数之后禁用 JIT 编译。这对于定位 JIT 错误编译的源代码可能很有帮助。注意：此选项仅在 JIT 触发设置为
     0（在脚本加载时编译）或1（第一次执行时编译）时起作用，例如 <code class="code">opcache.jit=1215</code>。更多详细信息请参阅 <a href="opcache.configuration.php#ini.opcache.jit" class="link">opcache.jit</a> 选项。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-prof-threshold">
    <code class="parameter">opcache.jit_prof_threshold</code>
    <span class="type"><a href="language.types.float.php" class="type float">float</a></span>
   </dt>
   <dd>
    <span class="simpara">
     当使用“首次请求时分析”触发模式时，此阈值确定是否视函数为热点。对该函数的调用次数除以所有函数的调用次数必须高于该阈值。例如，阈值为
     0.005 表示占所有调用次数超过 0.5% 的函数将被进行 JIT 编译。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-root-traces">
    <code class="parameter">opcache.jit_max_root_traces</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     Maximum number of root traces. The root trace is an execution flow taking one path through the code firstly,
     which is a unit of JIT compilation. JIT will not compile new code if it reaches this limit.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-side-traces">
    <code class="parameter">opcache.jit_max_side_traces</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     Maximum number of side traces a root trace may have. The side trace is another execution flow that does not
     follow the path of compiled root trace. Side traces belonging to the same root trace will not be compiled
     if it reaches this limit.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-exit-counters">
    <code class="parameter">opcache.jit_max_exit_counters</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     Maximum number of side trace exit counters. This limits the total number of side traces
     there may be, across all root traces.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-hot-loop">
    <code class="parameter">opcache.jit_hot_loop</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     After how many iterations a loop is considered hot.
     Valid value range is <code class="code">[0,255]</code>; for any setting out of this range,
     e.g. <code class="literal">-1</code> or <code class="literal">256</code>, default value will be
     used instead. <code class="literal">0</code> will disable JIT to trace and compile any loops.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-hot-func">
    <code class="parameter">opcache.jit_hot_func</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     After how many calls a function is considered hot.
     Valid value range is <code class="code">[0,255]</code>; for any setting out of this range,
     e.g. <code class="literal">-1</code> or <code class="literal">256</code>, default value will be
     used instead. <code class="literal">0</code> will disable JIT to trace and compile any functions.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-hot-return">
    <code class="parameter">opcache.jit_hot_return</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     After how many returns a return is considered hot.
     Valid value range is <code class="code">[0,255]</code>; for any setting out of this range,
     e.g. <code class="literal">-1</code> or <code class="literal">256</code>, default value will be
     used instead. <code class="literal">0</code> will disable JIT to trace and compile any returns.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-hot-side-exit">
    <code class="parameter">opcache.jit_hot_side_exit</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     After how many exits a side exit is considered hot.
     Valid value range is <code class="code">[0,255]</code>; for any setting out of this range,
     e.g. <code class="literal">-1</code> or <code class="literal">256</code>, default value will be
     used instead. <code class="literal">0</code> will disable JIT to trace and compile any side exits.
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-blacklist-root-trace">
    <code class="parameter">opcache.jit_blacklist_root_trace</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     在将 root trace 列入黑名单之前，尝试编译 side trace 的最大次数。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-blacklist-side-trace">
    <code class="parameter">opcache.jit_blacklist_side_trace</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     在将 side trace 列入黑名单之前，尝试编译 side trace 的最大次数。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-loop-unrolls">
    <code class="parameter">opcache.jit_max_loop_unrolls</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     在 side trace 中展开循环的最大尝试次数，试图到达 root trace 并关闭外循环。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-recursive-calls">
    <code class="parameter">opcache.jit_max_recursive_calls</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     递归调用循环的最大展开次数。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-recursive-return">
    <code class="parameter">opcache.jit_max_recursive_returns</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     递归返回循环的最大展开次数。
    </span>
   </dd>
  
  
   <dt id="ini.opcache.jit-max-polymorphic-calls">
    <code class="parameter">opcache.jit_max_polymorphic_calls</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <span class="simpara">
     内联 polymorphic（动态或方法）调用的最大尝试次数。超过此限制的调用被视为 megamorphic，不会进行内联处理。
    </span>
   </dd>
  
 </dl>
</div><?php manual_footer($setup); ?>