How to get the cpu time of a PHP script

Is there a way to get the CPU (ideally and memory) usage of a script?

Pretty much everything I've found so far has been about overall CPU usage, however, I only need the CPU utilization of my PHP script so that other running processes don't affect the results (this is the case when I just calculate the time or get the total usage CPU at a given time).

I will need some number of instructions, CPU usage time or something else that would allow me to compare the execution time of two scripts.

+3


source to share





All Articles