Go To Definition

Having the keyboard cursor at a symbol and pressing F12 or right-clicking to a symbol a choosing Go To Definition navigates the editor to the definition of the symbol if possible. If there are more possibilities, Find All Reference window is opened with the list of possibilities.

User Code

Go To Definition works within the project content, referenced composer packages and referenced projects. User files have to be added to the project. In case of non-standard file extensions like .inc or .php5, they have to be mapped to PHP Editor first in Tools | Options | Text Editor | File Extensions.

Navigating to a user-defined symbol (e.g. function, class or constant declared within the PHP project) opens the file within Visual Studio editor and moves keyboard cursor at beginning of the declaration.

PHP Manual

Go To Definition works even for symbols, that are not declared within the PHP project, like built-in PHP functions, classes and constants (e.g. class Exception). When navigating to such symbol, editor opens generated file in read-only mode, containing PHP-like declaration of the symbol. The generated declaration contains detailed PHPDoc comments, the file has all the navigation features like Navigation Bar etc.

Referenced Packages

When navigating to a symbol declared in a composer package, the corresponding file is opened in read-only mode. This prevents modifying of files that should only be updated through composer install/update commands.

File Names

In case of a string value within include, include_once, require and require_once, editor treats whole inclusion expression as a pattern, and tries to navigate to a file within project, that matches the pattern.

Note: Navigation to included file is available since version 1.18.