I learned about flame graphs and find them fascinating – however, I could find no useful reference on how to generate them for my PHP script(s). How can I gather the data and generate the graphs using PHP?
I found this article from platform.sh where they use xhprof to output the data set from the execution calls, then a perl script called flamegraph.pl process the data set to be displayed as a SVG. A bit more digging and I was able to find the official flame graph repo on GitHub that contains the flamegraph.pl logic. The three resources combined I was able to generate a flame graph as desired though YMMV.