PHPStorm
July 1, 2020

Guide to PhpStorm

PHP Development
Productivity

Long recognized as the leader in integrated development environment (IDE) for PHP, PHPStorm from JetBrains is a full-featured IDE that can both enhance the development environment as well as reduce the development life-cycle.

In this guide to PHPStorm, we look at some of the features that make PHPStorm popular, compare it against other PHP IDEs, discuss the considerations developers need to make when choosing a PHP IDE, then provide a list of helpful shortcuts you can use to better navigate PHPStorm — should you choose to use it.

What Is PhpStorm?

PhpStorm is a commercial PHP IDE developed by JetBrains. Compatible with PHP, HTML, and JavaScript, PhpStorm provides real-time code completion, error prevention, and refactoring features.

As PHP developers are well aware, developing a PHP application usually deals with more than just PHP and this is one of the areas that PHPStorm shines with support for the entire web development stack including HTML and JavaScript in addition to PHP. 

As will be shown later, PHPStorm even provides support for working with databases directly from the IDE environment which, since database access is a primary focus of many PHP applications, can be a great time saver in the development process.

Is PhpStorm Free?

PHPStorm is not a free product. Based on the subscription model, pricing models are available at both the yearly and monthly level with reduced costs for subsequent years. Free offerings in the PHP IDE space include NetBeans, Eclipse, and Visual Studio code.

How Does PhpStorm Compare to Other PHP IDEs?

PHPStorm certainly isn't the only IDE in the marketplace with other solutions including NetBeans, Eclipse, Visual Studio Code, and ZendStudio. But, as indicated earlier, PHPStorm is consistently ranked as the number one IDE for PHP development in many internet-based surveys.

All of the IDEs provide a similar set of base functionality including multi-language support and code completion. Where PHPStorm starts to outpace the competition is in areas such as Intelligent Code Completion, support for a variety of Frameworks, and expansive code inspection including support for SQL. 

The features outlined above aren't just for PHP. As an example, when working with SQL (a common task for a PHP developer), the PHPStorm features of inspection can be used as well as auto-completion of tables and fields which can help to ensure that the database structures are in sync with the code being developed. 

Considerations When Choosing a PHP IDE

When choosing an IDE it's important to keep the following considerations in mind:

Features and Functions

While important, don't get overwhelmed with the massive list of features and functions that some IDEs provide; rather, determine those features that are important to your development effort and ensure that the selected IDE provides those.

Integration with Other Development Tools

a development environment in which all of the tools work cooperatively together can lead to significant performance improvements in the development effort.  You will want to ensure that the selected IDE works well with the application server, and source code control systems deployed in the environment – both of which PHPStorm has good integration capabilities for.

Currency with Language Versions

like any modern language PHP is constantly evolving with new features.  It's important that the IDE stay current as well to ensure that IDE functions such as code-completion support new/modified functions provided by the language.

Cost

While an important consideration cost should actually be the last consideration.  As an example, free offerings may not be providing the features that you need for your development effort. 

Useful PhpStorm Shortcuts

To enhance a developers productivity in working with the features of PHPStorm itself there are a wealth of keyboard shortcuts including shortcuts related to editing, debugging, refactoring, navigation, and search tasks. We have put together a few tables for Windows shortcuts below. Click the links below to jump to the desired section.

General PHPStorm Shortcuts

These shortcuts are essential for basic PHPStorm use.

General PHPStorm Shortcuts for Windows
DescriptionWindows Shortcut
Search everywhereDouble Shift
Find ActionCtrl + Shift + A
Open corresponding tool windowAlt + #[0-9]
Toggle full screen modeCtrl + Alt + F11
Toggle maximizing editorCtrl + Shift + F12
Add to FavoritesAlt + Shift + F
Inspect current file with current profileAlt + Shift + I
Open Settings dialogCtrl + Alt + S
Switch between tabs and tool windowCtrl + Tab

PHPStorm Editing Shortcuts

If you're editing code with PHPStorm, these shortcuts are good ones to have close by.

PhpStorm Editing Shortcuts for Windows
DescriptionWindows Shortcut
Basic code completionCtrl + Space
Show intention actions and quick-fixesAlt + Enter
Parameter info (within method call arguments)Ctrl + P
Quick documentation lookupCtrl + Q
Brief InfoCtrl + mouse over code
Generate code... (Getters, Setters, Constructors)Alt + Insert
Override methodsCtrl + O
Implement methodsCtrl + I
Surround with... (if..else, try..catch, for, etc.)Ctrl + Alt + T
Comment/uncomment with line commentCtrl + /
Comment/uncomment with block commentCtrl + Shift + /
Select successively increasing code blocksCtrl + W
Decrease current selection to previous stateCtrl + Shift + W
Reformat codeCtrl + Alt + L
Auto-indent line(s)Ctrl + Alt + I
Duplicate current line or selected blockCtrl + D
Delete line at caretCtrl + Y
Smart line join (HTML and JavaScript only)Ctrl + Shift + J
Smart line split (HTML and JavaScript only)Ctrl + Enter
Start new lineShift + Enter
Toggle case for word at caret or selected blockCtrl + Shift + U
Select till code block end/startCtrl + Shift + ] / [
Delete to word endCtrl + Delete
Delete to word startCtrl + Backspace
Expand/collapse code blockCtrl + NumPad+/-
Close active editor tabCtrl + F4
Paste from historyCtrl+Shift+V

PHPStorm Debugging Shortcuts

Debugging a PHP application with PHPStorm? These shortcuts will come in handy.

PhpStorm Debugging Shortcuts for Windows
DescriptionWindows Shortcut
Step overF8
Step intoF7
Step outShift + F8
Evaluate expressionAlt + F8
Resume programF9
Toggle breakpointCtrl + F8
View breakpointsCtrl+Shift+F8

PHPStorm Refactoring Shortcuts

Refactoring code is hard enough. These refactoring shortcuts for PHPStorm can make it more surmountable.

PhpStorm Refactoring Shortcuts for Windows
DescriptionWindows Shortcut
Copy/MoveF5/F6
Safe DeleteAlt + Delete
RenameShift + F6
Inline VariableCtrl + Alt + N
Extract Method/Variable/Field/ConstantCtrl + Alt + M/V/F/C
Refactor This (shows all available refactorings)Ctrl + Alt + Shift + T

Quickly find relevant points in your code with these PHPStorm navigation shortcuts.

PhpStorm Navigation Shortcuts for Windows
DescriptionWindows Shortcut
Go to classCtrl + N
Go to fileCtrl + Shift + N
Go to symbolCtrl + Alt + Shift + N
Go to lineCtrl + G
Go to next/previous editor tabAlt + Right/Left
Go to editor (from tool window)Esc
Recent files popupCtrl + E
Navigate back/forwardCtrl + Alt + Left/Right
Navigate to last edit locationCtrl + Shift + Backspace
Select current file or symbol in any viewAlt + F1
Go to declarationCtrl + B or Ctrl + Click
Go to implementation(s)Ctrl + Alt + B
Open quick definition lookupCtrl + Shift + I
Go to type declarationCtrl + Alt + B
Go to super-method/super-classCtrl + U
Go to previous/next methodAlt + Up/Down
Move to code block end/startCtrl + ] / [
Next/previous highlighted errorF2 / Shift + F2
Edit source / View sourceF4 / Ctrl + Enter

Looking for something in your code? These PHPStorm search shortcuts can help.

PhpStorm Search Shortcuts for Windows
DescriptionWindows Shortcut
Find/ReplaceCtrl + F/R
Find next/previousF3/Shift + F3
Find/Replace in pathCtrl + Shift + F/R
Find usages / Find usages in fileAlt + F7 / Ctrl + F7
Highlight usages in fileCtrl + Shift + F7
Show usagesCtrl + Alt + F7

PHPStorm Integration With Zend Server

The PHPStorm ecosystem includes a number of extensions for adding additional capabilities to the IDE.  One of these extensions is to support Zend Debugger, a debugger that is included with Zend Server.  This allows the developer to integrate the debug capabilities of Zend Server with those of PHPStorm to enable capabilities such as launching debug sessions from the Zend Server environment (including code trace and ZRay).

Final Thoughts

IDEs can be a significant time-saver for PHP/Web development efforts and PHPStorm is an offering in the IDE space that is well worth evaluation and consideration. 

Additional Resources

Looking for additional information on how to use PHPStorm with Zend Server? The resources below are worth a look.

Did You Know Zend Offers Secure and Supported PHP 5.6 and 7.1 Runtimes?

Learn more about how to keep your application safe and secure with Zend PHP runtimes.

See More Information