(PHP 5 >= 5.5.11, PHP 7, PHP 8, PECL ZendOpcache >= 7.0.4)
opcache_is_script_cached — 判斷腳本是否已快取於 OPCache 中
$filename
這個函式會檢查 PHP 腳本是否已緩存在 OPCache 中。這可以用來更容易地偵測特定腳本的快取「預熱」情況。此函式僅檢查記憶體中的快取,而非檔案快取。
filename
要檢查的 PHP 腳本的路徑。
如果 filename 已緩存在 OPCache 中,則返回 true,否則返回 false。
true
false