Php:有没有像javaagent这样的java检测加载的源文件的PHP的检测api?

I want to do some instrumentation operation for php applications.

In java, There is the javaagent that offers the necessary hooks to do the work, But for php I don't have much experience and I don't know if it possible doable.

My goal is to detect every source file that is loaded and trying to grab it's dependencies ?

Is that possible?

Thanks in advance,

PS: I have a little knowledge for PHP and it's underlying platform so excuse me if I missed something.