PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.4.0
Defender Security – Malware Scanner, Login Security & Firewall v5.4.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / vendor / thecodingmachine / safe / generated / opcache.php

opcache.php in Defender Security – Malware Scanner, Login Security & Firewall 5.4.0, at vendor/thecodingmachine/safe/generated/opcache.php

43 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Safe;
4
5 use Safe\Exceptions\OpcacheException;
6
7 /**
8 * This function compiles a PHP script and adds it to the opcode cache without
9 * executing it. This can be used to prime the cache after a Web server
10 * restart by pre-caching files that will be included in later requests.
11 *
12 * @param string $file The path to the PHP script to be compiled.
13 * @throws OpcacheException
14 *
15 */
16 function opcache_compile_file(string $file): void
17 {
18 error_clear_last();
19 $result = \opcache_compile_file($file);
20 if ($result === false) {
21 throw OpcacheException::createFromPhpError();
22 }
23 }
24
25
26 /**
27 * This function returns state information about the cache instance
28 *
29 * @param bool $get_scripts Include script specific state information
30 * @return array Returns an array of information, optionally containing script specific state information.
31 * @throws OpcacheException
32 *
33 */
34 function opcache_get_status(bool $get_scripts = true): array
35 {
36 error_clear_last();
37 $result = \opcache_get_status($get_scripts);
38 if ($result === false) {
39 throw OpcacheException::createFromPhpError();
40 }
41 return $result;
42 }
43