This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
About ......................................................................................................................................................... 3
Purchasing Professional features .............................................................................................................. 7
Commercial license for more users ........................................................................................................... 7
Working with projects ................................................................................................................................... 8
Opening an existing PHP web site ............................................................................................................. 8
Navigation bar ......................................................................................................................................... 12
Surround with ...................................................................................................................................... 13
Go To Definition (F12) ............................................................................................................................. 15
Function assistance ................................................................................................................................. 15
All the PHP code is gray ........................................................................................................................... 17
Unable to change some colors in VS11/Visual Studio 2012 RC .............................................................. 18
Cannot obtain a trial license .................................................................................................................... 18
Cannot activate professional features after the purchase ...................................................................... 18
Slow or unstable PHP Editor .................................................................................................................... 18
Some of functions within my project are not included in IntelliSense lists ............................................ 19
The editor uses all built-in settings. This lets you to use PHP Editor with your existing custom settings
easily. Following Display items affects PHP Tools Editor
Keyword – Affects PHP keywords, such as for, while, if, function.
Comment – Color of inline comments and content of PHPDoc.
Identifier – Any identifier, such as a function name or a class name. String – Color of string literals, enclosed in “” or ‘’ quotes.
Number – Numeric literal.
Text – Other simple symbols, including commas and operators.
HTML Server-Side Script – PHP starting and ending scripting tags (<?php ?>) HTML Attribute Name – Color of HTML attribute name.
HTML Attribute Value – Color of HTML attribute value.
PHP - Encapsulated Variable – Color of a variable name within a string literal.
PHP - Variable – Color of variable name. That is typically a symbol starting with $ character. PHP – PHPDoc Keyword – Color of special keywords and comment tokens within PHPDoc.
Smart Indentation PHP editor supports smart indentation feature. It should be enabled by default, otherwise go to “Tools ->
Options -> Text Editor -> PHP -> Tabs”, and select “Smart” in the “Indenting” options group.
Smart Indenting automatically indents or outdents new lines. It recognizes what you are actually typing:
- <enter> key will place your caret to the best position for new statement or for continuing
unfinished statement. This also works within PHPDoc or multi-lined comments, by adding ‘*’ at
the line beginning.
- ‘{‘ character outdents current line to line up with code block start.
- ‘}’ character outdents current line to match block start. If the code is syntactically valid, it also
reformats code block (see Automatic Formatting).
- ‘:’ after ‘case’ or ‘default’ makes indentation of the line the same as other ‘case’s within the
switch.
Automatic Formatting You can fix indentation and code formatting automatically by pressing Ctrl+K,D. This will reformat PHP
code within the whole document, and adds additional new lines where they should be, to make your
code more readable and to preserve formatting conventions across the whole project.
PHP editor also supports reformatting of a text selection only. Select code fragment and press Ctrl+K,F to
reformat only a piece of code. Formatting selection is called automatically on code blocks that you just
closed with ‘}’ character (you can always disable this feature in PHP Editor Options).
Automatic Formatting respects common programming conventions and Visual Studio conventions. It
keeps your new line breaks, keeps single-lined <?php ?> blocks and your custom indentation settings.
- Snippets browser. Small tool window with list of available snippets can be opened anywhere in PHP code. By subsequent typing, selecting and pressing enter key, code snipped is inserted at the current caret position. By default, snippet browser is opened by pressing ‘Ctrl+K,X’ or by mouse right click and choosing “Insert Snippet” command. Inserting snippets only works within PHP code block.
- Code completion drop down. Code snippets are
included as a part of code completion list (see Code completion). Keywords supporting snippet insertion are marked with special icon. By pressing ‘tab’ key the keyword is inserted as a snippet.
Surround with
In addition to inserting clean snippets, you can surround an existing code with the snippet code. It is very
useful feature allowing you to easily create e.g. function, a loop or try block around an existing code.
To choose a snippet you would like to use, press ‘Ctrl+K,S’ (default) or use right mouse click and select
“Surround with” command. Snippet browser will pop up, and chosen snippet will surround selected text.
Integrated documentation PHP editor contains database of built-in PHP functions, classes and constants, contained in every official
PHP extension. Every symbol is annotated with detailed documentation. This means you’ll see
description of anything you are selecting from IntelliSense lists or mouse hovering.
When you are typing, PHP Editor shows a list of available symbols within your current code context.
After highlighting a symbol in the list, tool tip bubble is displayed aside of the drop down list with
complete symbol declaration and its description. This makes you easier to check anything you are about
to use, without a need of navigating to documentation on web.
In the opened dialog select “Source Code (Text) Editor” or “PHP Editor” and click “Set as Default”.
Unable to change some colors in VS11/Visual Studio 2012 RC Currently there is misbehavior in VS11 and Visual Studio 2012 RC causing additional colorable items
(‘PHP – Encapsulated Variable’ and ‘PHP – PHPDoc Keyword’) are not available within ‘Fonts and Colors’
options dialog (see Custom colorization). To fix this follow the thread on our support forum at
Cannot obtain a trial license To enable professional features, by clicking on ‘Try’ button within Welcome screen, you need an Internet
connection. Check your Internet connection and try again.
In case the process still fails, please contact us at [email protected].
Cannot activate professional features after the purchase To enable professional features you need an Internet connection. Check your Internet connection and
try again.
With working Internet connection, try to enter license key within licensing window, by clicking on
“Activate product” button.
In case the process still fails, please contact us at [email protected].
Slow or unstable PHP Editor The PHP Editor is fine-tuned to work fluently with vast array of existing PHP code. It is possible you’ve
found a case causing internal code analysis working slower. You can report such issue to us at
http://support.devsense.com/viewforum.php?f=21. Any feedback is appreciated. We will make our bests
Some of functions within my project are not included in IntelliSense lists Ensure you have opened a PHP project (see Opening an existing PHP web site) including files containing
your functions first. If there are syntax errors, PHP Editor would not be sure about your function
declarations and may exclude them from IntelliSense lists.
Contact PHP Tools for Visual Studio is developed and supported by DEVSENSE.
http://www.devsense.com/products/php-tools - product web site, features, pricing, demos.