脚本是否被opCache命中或没有?

Is it possible to tell from inside of PHP whether a script was hit by opCache or no.

I know that I can find out some statistics from phpinfo() about the number of

  • Cache hits
  • Cache misses
  • Cached scripts
  • Cached keys

The problem is that this is just statistics. What I want is to do the following. When I run some script test.php from inside script it would tell me whether it was hit or missed by opCache. Is it possible to do so?