Tests: PHP shared opcache test added.
This commit is contained in:
18
test/php/opcache/index.php
Normal file
18
test/php/opcache/index.php
Normal 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');
|
||||
}
|
||||
|
||||
?>
|
||||
1
test/php/opcache/test.php
Normal file
1
test/php/opcache/test.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php phpinfo(); ?>
|
||||
Reference in New Issue
Block a user