uTools-Manuals/docs/php/opcache_is_script_cached.html
2019-04-28 19:00:34 +08:00

68 lines
2.4 KiB
HTML

<!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>Tells whether a script is cached in OPCache</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.opcache-is-script-cached" class="refentry">
<div class="refnamediv">
<h1 class="refname">opcache_is_script_cached</h1>
<p class="verinfo">(PHP 5 &gt;= 5.5.11, PHP 7, PECL ZendOpcache &gt;= 7.0.4)</p><p class="refpurpose"><span class="refname">opcache_is_script_cached</span> &mdash; <span class="dc-title">Tells whether a script is cached in OPCache</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.opcache-is-script-cached-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>opcache_is_script_cached</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$file</code></span>
) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
This function checks if a PHP script has been cached in OPCache. This can be
used to more easily detect the &quot;warming&quot; of the cache for a particular script.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.opcache-is-script-cached-parameters">
<h3 class="title">参数</h3>
<dl>
<dt>
<code class="parameter">file</code></dt>
<dd>
<p class="para">
The path to the PHP script to be checked.
</p>
</dd>
</dl>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.opcache-is-script-cached-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns <strong><code>TRUE</code></strong> if <code class="parameter">file</code> is cached in OPCache,
<strong><code>FALSE</code></strong> otherwise.
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.opcache-is-script-cached-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="opcache_compile_file.html" class="function" rel="rdfs-seeAlso">opcache_compile_file()</a> - 无需运行,即可编译并缓存 PHP 脚本</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>