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

contributors($setup);

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

     </thead>

     <tbody class="tbody">
      <tr>
       <td><a href="ffi.configuration.php#ini.ffi.enable" class="link">ffi.enable</a></td>
       <td>&quot;preload&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="ffi.configuration.php#ini.ffi.preload" class="link">ffi.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 class="empty">&nbsp;</td>
      </tr>

     </tbody>
    
   </table>

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

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

  <dl>
   
    <dt id="ini.ffi.enable">
     <code class="parameter">ffi.enable</code>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
    </dt>
    <dd>
     <span class="simpara">
      Allows enabling (<code class="literal">&quot;true&quot;</code>) or disabling
      (<code class="literal">&quot;false&quot;</code>) FFI API usage, or restricting it only to
      the CLI SAPI and preloaded files (<code class="literal">&quot;preload&quot;</code>).
     </span>
     <span class="simpara">
      The FFI API restrictions only affect the <span class="classname"><a href="class.ffi.php" class="classname">FFI</a></span> class,
      but not overloaded functions of <span class="classname"><a href="class.ffi-cdata.php" class="classname">FFI\CData</a></span> objects.
      This means that it is possible to create some <span class="classname"><a href="class.ffi-cdata.php" class="classname">FFI\CData</a></span>
      objects in preloaded files, and then to use these directly in PHP scripts.
     </span>
    </dd>
   
   
    <dt id="ini.ffi.preload">
     <code class="parameter">ffi.preload</code>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
    </dt>
    <dd>
     <span class="simpara">
      Allows preloading of FFI bindings during startup, which is not possible with <span class="methodname"><a href="ffi.load.php" class="methodname">FFI::load()</a></span>
      if <a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a> is set.
      This directive accepts a <strong><code><a href="dir.constants.php#constant.directory-separator">DIRECTORY_SEPARATOR</a></code></strong> delimited list of filenames.
      The preloaded bindings can be accessed by calling <span class="methodname"><a href="ffi.scope.php" class="methodname">FFI::scope()</a></span>.
     </span>
    </dd>
   
  </dl>
 </div><?php manual_footer($setup); ?>