summaryrefslogblamecommitdiffhomepage
path: root/test/php/opcache/index.php
blob: cf67c4c243e507c2f16fb979ba41e81e933db6d2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                          
                            


  
<?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-OPcache: -1');
}

?>