summaryrefslogtreecommitdiffhomepage
path: root/test/php/opcache/index.php
blob: de4002bbe53379d12cf5a0953c20f42f1cdf1533 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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');
}

?>