Searching for PHP Elements

Searching for PHP elements is a functionality that allows you to search for PHP elements with your defined specifications. PHP elements are classes, functions, constants, types, methods and references/declarations that are used in your code. Use this option if you want to locate one of these elements in your workspace, project or in a single file.

Note:

For information about the "Search" tab in the "Search" dialog, read below. To learn more about the additional tabs in the "Search" dialog see File Search in the Workbench User Guide. If you are using the Remote Search option, be aware that it does not search all of the resources of the remote server.

This procedure describes how to search for PHP elements (classes, functions and constants) within your files and projects.

To search for a PHP element:

  1. From the Menu Bar go to Search | Search-or- press Ctrl+H. The "PHP Search" dialog will open.
    PHP Search
  2. Enter a search string. You have the option of using Wildcards.

You can make your search case sensitive by selecting the "Case sensitive" box.

  1. Select whether to search for a:
  2. Select whether to limit your search to:
  3. To extend your search to include interpreter system libraries, select the "Search the Interpreter system libraries" box. This allows PDT to search in the libraries of the PHP version you have selected in the PHP Interpreter Preferences.
  4. Select whether to search in your:
  5. Click Search

The Search view will open displaying the results of the search.

To go to an element, double-click the required option from the search view.

search_results.png

Note:

By default, the File Search, Remote Search, Task Search, Java Search and JavaScript Search dialogs will be tabbed with the PHP Search dialog. To make these unavailable, click Customize...within the PHP Search dialog and unmark required options.

Hotkeys

The following hotkeys are available:

ActionShortcut
Esc / Alt+F4Closes the Search dialog.
Alt + ABrings the cursor to the "Search string" field.
Alt + IChecks/unchecks the "Case Sensitive" checkbox.
Alt + TChecks "Type" in the "Search For" box.
Alt +MChecks "Method" in the "Search For" box.
Alt +FChecks "Field" in the "Search For" field.
Alt +LChecks "Declarations" in the "Limit To" field.
Alt +RChecks "References" in the "Limit To" field.
Alt +OChecks "All occurrences" in the "Limit To" field.
Alt +YChecks/unchecks the "Search the Interpreter system libraries"field.
Alt + WSelects "Workspace" in the "Scope" field.
Alt + DSelects "Selected resources" in the "Scope" field.
Alt + JSelects "Enclosing projects" in the "Scope" field.
Alt + KSelects "Working set" in the "Scope" field.
Alt + HOpens the "Select Working Sets" dialog.
Alt + SPerforms the search and shows the results in the Search view.
Alt +ZOpens the "Search Page Selection" dialog and allows you to customize the search page.