Christie Christie - 6 months ago 24
Linux Question

How to see which PHP script is consuming the most memory?

I'm trying to see which of my PHP scripts uses the most memory and CPU when it's viewed by a browser. I can only find methods like

that show per-process usage, but I need it narrowed down for a particular PHP script. Is there any way to do this?


If you want to see how much memory a particular PHP script uses you can use the memory_get_usage function listed here.