Php Editor

Php editor Overview

Php editor for Visual Studio provides the key features provided by other languages. VS.Php is designed to offer the same editing experience you get from C# or VB.Net. VS.Php supports both Php4 and Php5 syntax.

Php editor intellisense supports

  • Classes
  • Functions
  • Methods
  • Constants
  • Arrays
  • PhpDoc
  • Parameters
  • Php modules

The php editor in VS.Php uses PhpDoc comments to add type information to variables, parameters, classes, etc. This makes the engine more useful by providing the right type of context when showing the intellisense menu. The Php Doc intellisense tutorial illustrates how this feature works.

Php editor productivity features

The php editor comes with a lot of productivity features that enhance your experience and helps you make your job a lot easier. Code outlining is one of these key features in the Php editor. You can collapse classes, functions and php blocks to better navigate across the file. You can also define your own code regions and add labels to each region. The php editor supports PhpDoc style regions as well as .Net style regions.

Another key feature of the Php editor is the ability to check for syntax errors as you type your code. The php editor will mark syntax errors in the code and will tell you what's wrong with the code so you can quickly fix the problem before you execute your code. The real time syntax checker runs in the background and does not slow down the editor responsiveness even on very large php files.

Visual Studio developers are used to have editors that auto indent their code as they type and paste code. The php editor is no exception offering a wide range of auto formating features. It auto indents code as you type including brackets, function parameters spaning multiple lines and HereDoc sections. When you paste code into the editor, the php editor will auto indent the code to match the surrounding code. You can also auto format sections of code as well as sections of the file at any time with the click of a mouse.

VS.Php also offers a navigation bar on top of the php editor that lets you jump to functions and classes defined in the file. There are two combo boxes available on top of the editor window. The one on the left lets you select a class or global functions. The one on the right shows the global functions or methods of the class selected in the left box. Classes, functions and methods are in alphabetical order for ease of use. The navigation bar also selects the fuction or method where the cursor is located. so if your function does not fit the whole window, you can look at the navigation bar to know which function the cursor is.

Php editor customization

The php editor offers a wide range of customization features. One of these features is the ability to customize the colors for the various types of text in a Php file including keywords, strings, operators, etc. You can even change the background color so Php sections and Html sections have different backgrounds.

Other php editor customizations include auto indentation settings that match other Visual Studio languages. The html assist feature can also configure the behaviour of closing html tags to choose to automatically add the ending tag. The intellisense feature has an auto suggest feature that can also be configured in the php editor.