Profiling PHP Overview
PHP code profiling allows you to inspect how much time and how many calls were made to every single function in the code.
Similarly to debugging requirements, profiling requires a local installation of
- Local installation of PHP (7 - 8.0, or newer)
- Xdebug PHP extension
Profiling Tool Window
Open PHP Profiling Tool Window in
Open PHP Profiler menu.
The PHP Profiling tool window lets you start a PHP profiling session, inspect requests, and open profiling results in a separate Profiler View.
Launch Setting, if you have a PHP project opened.
PHP executableto run.
php.exe. By default, it's
"-S localhost:8000 -t ."which starts a development server on
Start Profilingto launch
php.exewith the specified arguments.
- In your browser, open
http://localhost:8000/(by default) to collect profiling data. Each finished request is listed in the tool window with brief information. To display details, click
Inspecting Profiling Data
Open details by clicking on
View. This will open Profiler View with collected data.
Opening Existing Profiling Results
In case the user has an existing profiling file (CacheGrind format, either uncompressed, or
gz compressed), the file can be opened by drag&drop onto the Profiling Tool Window.
Profiling PHPUnit Test
See Profiling PHPUnit Tests for details.