GoLang opcache_compile_file

request it (330)
GoLang replacement for PHP's opcache_compile_file [edit | history]



Do you know a GoLang replacement for PHP's opcache_compile_file? Write it!

PHP opcache_compile_file

PHP original manual for opcache_compile_file [ show | php.net ]

opcache_compile_file

(PHP 5 >= 5.5.5, PHP 7, PECL ZendOpcache > 7.0.2)

opcache_compile_fileCompiles and caches a PHP script without executing it

Description

bool opcache_compile_file ( string $file )

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.

Parameters

file

The path to the PHP script to be compiled.

Return Values

Returns TRUE if file was compiled successfully or FALSE on failure.

Errors/Exceptions

If file cannot be loaded or compiled, an error of level E_WARNING is generated. You may use @ to suppress this warning.

See Also