Description
SPX is a profiling extension for PHP, built with a web interface for viewing its results. It is designed to be totally free and to keep all data inside your own infrastructure, with no data sent to a SaaS service. You turn on profiling either by setting an environment variable for command-line scripts, or by switching on a setting for a web request, and you do not need to instrument your code or install a browser extension. Ctrl-C can even stop a long-running command-line script while it is being profiled. SPX records 22 metrics, covering time and memory, included files, objects in use and I/O. Unlike Xhprof, it keeps the full call stack for each call rather than aggregating by caller and callee pairs, which makes timeline and Flamegraph analysis possible. Its web UI lets you enable and configure profiling for the current browser session, list the reports that have been captured, and open a report in one of three views: a timeline that scales to millions of function calls, a flat profile, or a Flamegraph. The extension runs on x86-64 or ARM64 with GNU/Linux, macOS or FreeBSD, and supports PHP 5.4 to 8.5. Installation can be done with PIE or from source, and you then add the extension to your php.ini. The source is on GitHub at NoiseByNorthwest/php-spx.…
Highlights
- Profiles PHP command-line and web requests
- 22 time, memory and I/O metrics
- Keeps the full call stack for flamegraphs
- Built-in web UI for reports
- Timeline, flat profile and Flamegraph views
Ratings & Reviews
No ratings yet
Be the first to rate PHP SPX.
People also visit
PHP SPX FAQ
What is SPX?
A simple profiling extension for PHP with a built-in web UI for viewing reports.
Does my data leave my servers?
No. The site says SPX is confined to your infrastructure, and nothing goes to a SaaS service.
How do I start profiling?
Set an environment variable for command-line scripts, or switch on a setting for a web request.
Which PHP versions are supported?
PHP 5.4 to 8.5, on x86-64 or ARM64 with GNU/Linux, macOS or FreeBSD.
How do I install it?
Through PIE or from source, then add extension=spx.so to your php.ini.
Is it free?
Yes. The project describes itself as totally free, and the source is on GitHub.
What are the best PHP SPX alternatives?
Popular alternatives to PHP SPX include Speedscope, Spark and Zipkin PHP. See all PHP SPX alternatives










