xref: /unit/test/php/opcache/index.php (revision 2054:357dee5c1861)
1<?php
2
3$pid = getmypid();
4
5header('X-Pid: ' . $pid);
6
7if (function_exists('opcache_is_script_cached')) {
8    if (opcache_is_script_cached(__DIR__ . '/test.php')) {
9        header('X-Cached: 1');
10    } else {
11        header('X-Cached: 0');
12        opcache_compile_file(__DIR__ . '/test.php');
13    }
14} else {
15    header('X-OPcache: -1');
16}
17
18?>
19