<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.opcache.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'function.opcache-compile-file.php',
    1 => 'opcache_compile_file',
    2 => 'Compila e armazena em cache um script PHP sem execut&aacute;-lo',
  ),
  'up' => 
  array (
    0 => 'ref.opcache.php',
    1 => 'Fun&ccedil;&otilde;es de OPcache',
  ),
  'prev' => 
  array (
    0 => 'ref.opcache.php',
    1 => 'Fun&ccedil;&otilde;es de OPcache',
  ),
  'next' => 
  array (
    0 => 'function.opcache-get-configuration.php',
    1 => 'opcache_get_configuration',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'pt_BR',
    'path' => 'reference/opcache/functions/opcache-compile-file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.opcache-compile-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">opcache_compile_file</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.5, PHP 7, PHP 8, PECL ZendOpcache &gt; 7.0.2)</p><p class="refpurpose"><span class="refname">opcache_compile_file</span> &mdash; <span class="dc-title">Compila e armazena em cache um script PHP sem executá-lo</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.opcache-compile-file-description">
  <h3 class="title">Descrição</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>opcache_compile_file</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Esta função compila um script PHP e o adiciona ao cache opcode
   sem executá-lo. Isso pode ser usado para preparar o cache após a reinicialização de um servidor da Web,
   armazenando previamente em cache os arquivos que serão incluídos em solicitações posteriores.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.opcache-compile-file-parameters">
  <h3 class="title">Parâmetros</h3>
  <dl>
   
    <dt><code class="parameter">filename</code></dt>
    <dd>
     <span class="simpara">
      O caminho para o script PHP a ser compilado.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.opcache-compile-file-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="simpara">
   Retorna <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> se <code class="parameter">filename</code> foi compilado com sucesso
    ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> em caso de falha.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.opcache-compile-file-errors">
  <h3 class="title">Erros/Exceções</h3>
  <p class="simpara">
   Se <code class="parameter">filename</code> não puder ser carregado ou compilado, um erro de
   nível <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> será gerado. Você pode usar
   <a href="language.operators.errorcontrol.php" class="link">@</a> para suprimir este
   aviso.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.opcache-compile-file-seealso">
  <h3 class="title">Veja Também</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.opcache-invalidate.php" class="function" rel="rdfs-seeAlso">opcache_invalidate()</a> - Invalida um script em cache</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>