Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 4961

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Invalidates a cached script</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.opcache-get-status.html">opcache_get_status</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.opcache-reset.html">opcache_reset</a></div>
 <div class="up"><a href="ref.opcache.html">OPcache Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><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, 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">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">boolean</span> <span class="methodname"><strong>opcache_invalidate</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$script</code></span>
   [, <span class="methodparam"><span class="type">boolean</span> <code class="parameter">$force</code><span class="initializer"> = <strong><code>FALSE</code></strong></span></span>
  ] )</div>

  <p class="para rdfs-comment">
   This function invalidates a particular script from the opcode cache. If
   <em><code class="parameter">force</code></em> is unset or <strong><code>FALSE</code></strong>, the script will only be
   invalidated if the modification time of the script is newer than the cached
   opcodes.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.opcache-invalidate-parameters">
  <h3 class="title">Parameters</h3>
  <dl>

   <dt>

    <span class="term"><em><code class="parameter">script</code></em></span>
    <dd>

     <p class="para">
      The path to the script being invalidated.
     </p>
    </dd>

   </dt>

   <dt>

    <span class="term"><em><code class="parameter">force</code></em></span>
    <dd>

     <p class="para">
      If set to <strong><code>TRUE</code></strong>, the script will be invalidated regardless of whether
      invalidation is necessary.
     </p>
    </dd>

   </dt>

  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.opcache-invalidate-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> if the opcode cache for <em><code class="parameter">script</code></em> was
   invalidated or if there was nothing to invalidate, or <strong><code>FALSE</code></strong> if the opcode
   cache is disabled.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.opcache-invalidate-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.opcache-compile-file.html" class="function" rel="rdfs-seeAlso">opcache_compile_file()</a> - Compiles and caches a PHP script without executing it</span></li>
    <li class="member"> <span class="function"><a href="function.opcache-reset.html" class="function" rel="rdfs-seeAlso">opcache_reset()</a> - Resets the contents of the opcode cache</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.opcache-get-status.html">opcache_get_status</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.opcache-reset.html">opcache_reset</a></div>
 <div class="up"><a href="ref.opcache.html">OPcache Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>