CacheTool\Proxy\OpcacheProxy::opcache_compile_file PHP Method

opcache_compile_file() public method

This function compiles a PHP script and adds it to the opcode cache without executing it. This can be used to prime the cache after a Web server restart by pre-caching files that will be included in later requests.
Since: 5.5.5
Since: 7.0.2
public opcache_compile_file ( string $file ) : boolean
$file string The path to the PHP script to be compiled.
return boolean Returns TRUE if file was compiled successfully or FALSE on failure.
    public function opcache_compile_file($file)
    {
        $code = new Code();
        $code->addStatement(sprintf('return opcache_compile_file(%s);', var_export($file, true)));
        return $this->adapter->run($code);
    }