User Guide > Tasks > Profiling Files and Applications > Locally Profiling a PHP Script

Locally Profiling a PHP Script

This procedure describes how to Profile a PHP Script from your workspace using Zend Studio's internal debugger:

 

 

Instructions on how to complete a procedure

To locally Profile a PHP Script:

  1. Click the arrow next to the Profile button on the toolbar and select Open Profile Dialog -or- from the main menu go to Run | Open Profile Dialog -or-right-click  in PHP Explorer view and select Open Profile Dialog.

  2. A Profile dialog will appear.

  1. Double-click the PHP Script option to create a new Profile configuration.

  2. Enter a name for the new configuration.

  1. Select from the following options:

    • Workspace default PHP - Select  to use the default PHP and execution environment defined in the Execution Environments Preferences page.

    • Execution environment - Select the execution environment you would like to use for your debug configuration from the dropdown list.
      Click Environments to change the settings in the Execution Environments Preferences page.

    • Alternate PHP - Select to use another PHP which can be selected from the Installed PHP's list.  

  1. Enter your PHP file in the "PHP File" text field, or click Browse and select your file.

  2. Marking the 'Display debug information when running' checkbox will cause debug views to be displayed.

  3. If necessary, you can add arguments in the PHP Script Arguments tab to simulate command line inputs.

  4. Click Apply and then Profile.

  1. 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 Profiling 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.

Note:

If the file contains 'include' or 'require' calls to files which are not contained within the project, you must add them to the project's Include Path in order to simulate your production environment.

 

 

Related Links:

Using the Profiler
Profiling a PHP Script

Remotely Profiling a PHP Script

Profiling a PHP Web Page

Profiling a URL

Profiling

Working with the Profiler

 

 

©1999-2013 Zend Technologies LTD. All rights reserved.