Is there some way to get the CPU (ideally also memory) usage of a script?
Pretty much everything I found so far was about general CPU usage - however what I need is just a CPU usage of my PHP script, so that other running processes don't affect the results (which is the case when I simply calculate the time or get the total CPU usage at a given time).
What I need would be some number of instructions, time of CPU time used or whatever that would allow me to compare the run time of 2 scripts.