<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.opcache-invalidate.php',
    1 => 'opcache_invalidate',
    2 => 'Invalidates a cached script',
  ),
  'up' => 
  array (
    0 => 'ref.opcache.php',
    1 => 'Функції OPcache',
  ),
  'prev' => 
  array (
    0 => 'function.opcache-get-status.php',
    1 => 'opcache_get_status',
  ),
  'next' => 
  array (
    0 => 'function.opcache-is-script-cached.php',
    1 => 'opcache_is_script_cached',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/opcache/functions/opcache-invalidate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.opcache-invalidate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">opcache_invalidate</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8, PECL ZendOpcache &gt;= 7.0.0)</p><p class="refpurpose"><span class="refname">opcache_invalidate</span> &mdash; <span class="dc-title">Invalidates a cached script</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.opcache-invalidate-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>opcache_invalidate</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="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$force</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   This function invalidates a particular script from the opcode cache. If
   <code class="parameter">force</code> is unset or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, the script will only be
   invalidated if the modification time of the script is newer than the cached
   opcodes. This function only invalidates in-memory cache and not file cache.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.opcache-invalidate-parameters">
  <h3 class="title">Параметри</h3>
  <dl>
   
    <dt><code class="parameter">filename</code></dt>
    <dd>
     <p class="para">
      The path to the script being invalidated.
     </p>
    </dd>
   
   
    <dt><code class="parameter">force</code></dt>
    <dd>
     <p class="para">
      If set to <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, the script will be invalidated regardless of whether
      invalidation is necessary.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.opcache-invalidate-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the opcode cache for <code class="parameter">filename</code> was
   invalidated or if there was nothing to invalidate, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the opcode
   cache is disabled.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.opcache-invalidate-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.opcache-compile-file.php" class="function" rel="rdfs-seeAlso">opcache_compile_file()</a> - Compiles and caches a PHP script without executing it</span></li>
    <li><span class="function"><a href="function.opcache-reset.php" class="function" rel="rdfs-seeAlso">opcache_reset()</a> - Resets the contents of the opcode cache</span></li>
   </ul>
  </p>
 </div>

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