# Locally Profiling a PHP Script

This procedure describes how to profile a PHP Script from your workspace using an internal PHP Executable.

1. Click the arrow next to the Profile button on the toolbar and select Profile Configurations... -or- from the main menu go to Run | Profile Configurations... -or-right-click in Project Explorer view and select Profile As | Profile Configurations...
2. A Profile launch configuration dialog will appear.
3. Double-click the PHP CLI Application option to create a new Profile configuration.

4. Enter a name for the new configuration.
5. Select from the following options:
   - Workspace default PHP - Select to use the workspace/project default PHP
   - Execution environment - Select the execution environment you would like to use for your debug configuration from the dropdown list.
   - Alternate PHP - Select to use another PHP which can be selected from the Installed PHP's list.
6. Enter your PHP file in the PHP File text field, or click Browse and select your file.
7. If necessary, you can add arguments in the PHP Script Arguments tab to simulate command line inputs.
8. Select Profiler tab and uncheck Show Code Coverage option if information about code coverage is not needed.

9. Click Apply and then Profile.
10. A confirmation dialog will be displayed asking whether you want to open the profiling perspective. Click Yes. (If you would like the profiling perspective to open by default in the future, mark the 'Remember my decision' checkbox.)

The PHP Profile Perspective will open, displaying the Profiling Monitor window with various Profiling views.

See PHP Profile perspective for more on the information displayed once a profile session has been run.

#### Related Links:

- Profiling
- PHP Profile perspective
- Profiling PHP Web Page
- Profiling with Browser Toolbars
- Exporting Profile Sessions
- Importing Profile Sessions
- Exporting HTML Report