Tests: PHP shared opcache test added.

This commit is contained in:
Max Romanov
2021-11-09 15:48:44 +03:00
parent 506ec2b825
commit b424a00ec5
4 changed files with 54 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
<?php
$pid = getmypid();
header('X-Pid: ' . $pid);
if (function_exists('opcache_is_script_cached')) {
if (opcache_is_script_cached(__DIR__ . '/test.php')) {
header('X-Cached: 1');
} else {
header('X-Cached: 0');
opcache_compile_file(__DIR__ . '/test.php');
}
} else {
header('X-Cached: -1');
}
?>

View File

@@ -0,0 +1 @@
<?php phpinfo(); ?>