PhpStorm Features — PHP Code Editor
Intelligent Code Editor
PhpStorm features a rich and intelligent code editor for PHP that actually "gets" your code and deeply understands its structure, supporting PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1 for modern and legacy projects. The IDE provides smart code completion, syntax highlighting, extended code formatting configuration, on-the-fly error checking, code folding, supports language mixtures and more.
Language Features Support
The latest PHP 7 is supported including support of anonymous classes, return type declarations, null coalesce operator, group use declarations, context sensitive lexer, and more. PHP 7.1 compatibility inspections will help update your project to the latest PHP version. PHP 5.3, 5.4, 5.5, 5.6, and 7.0 are supported as well.
The Rename and Move refactorings work for files, functions, constants, classes, properties, methods, parameters, and local and global variables. Make global project changes easily and safely. Local changes are made instantly in-place.
The following refactorings are also available: Extract Variable / Constant / Field / Method / Interface, Inline variable, Push members Up / Pull members Down, Change signature, Move class to another namespace, Move static member, Make Static refactoring.
With Parameter hints in PhpStorm, code becomes more readable and easier to understand. Parameter hints are showed for literals and nulls used as method arguments, helping you better understand the semantics of specific methods.
Automatic code completion (invoked on typing) finalizes classes, methods, variable names, and PHP keywords, plus commonly used names for fields and variables depending on their type. Code completion also supports array indexes in PHP code.
Code formatter with code style configuration and other features help you write neat code that's easy to maintain. PhpStorm contains built-in code formatting that is compliant with PSR1/PSR2, Symfony2, Zend, Drupal & other standards.
Code (re)arranger is a powerful tool to control the structure of your existing and generated code. For example, you can specify methods to be ordered after fields or keep dependent methods together.
PhpStorm editor respects PHPDoc in your code and provides appropriate code completion suggestions based on annotations. When you edit PHPDoc for your code, variable names and types are auto-completed from the corresponding code blocks. PHP code refactorings also consider PHPDocs to keep them up to date.
The existing support of template engines and command-line tools is boosted with a more high-level feature: an MVC view for Symfony2 & Yii frameworks.
Plugins are also available bringing various framework-specific features, such as code completion, navigation, type inference and other IDE best practices for various PHP frameworks (Symfony, Drupal, Magento, Laravel, etc.).
Get more information in PhpStorm plugin repository
Code Quality Analysis
Hundreds of code inspections verify your code as you type and inspect the whole project for possible errors or code smells.
Quick-fixes for most inspections make it easy to fix or improve the code instantly. Alt+Enter shows appropriate options for each inspection.
PHP Code Sniffer & Mess Detector
Check your code on the fly with PHP Code Sniffer (phpcs) and PHP Mess Detector (phpmd), just by opening a PHP file. The check is triggered every time you change something in the file, so it's extremely easy to fix problems reported by PHP Code Sniffer & PHP Mess Detector.
Smart Duplicated Code Detector
Added for all major supported languages including PHP, HTML and CSS. Use Code | Locate Duplicates to start your quest against copy/paste coding. You'll be presented with a list of candidates for refactoring — and with the help of refactorings it's easy to keep your code DRY.
Code editor understands callback references within string literals, and provides advanced assistance such as usages search and rename refactoring.
PhpStorm transparently recognizes Phar-packaged code.
Twig, Blade & Smarty Templates
Use the Twig, Blade or Smarty template engine to take advantage of productivity features when working with template files: configurable syntax highlighting for different constructs; syntax errors highlighting; functions and attributes completion; automatic insertion of paired braces, quotes and closing tags; and more.
Efficient Project Analysis and Navigation
Its thorough source code analysis allows PhpStorm to provide sophisticated code completion even for unannotated code, for example when the function return type is deducted from its body and return statements or class property types (and declarations) are extracted from the constructor code.
File structure view and class, method and call hierarchy views allow for faster code review and navigation.
PhpStorm provides smart handling of namespaces, with Auto-Import, Optimize Imports, folding for imports, and more.
Dataflow Analysis helps you understand you project code better, interpret complicated parts of code, find bottlenecks in the source code, and more.
Easy Code Navigation & Search
Go to class / file / symbol — crucial operations for fast project navigation. Use wild-cards and abbreviations to locate needed items faster.
Go to declaration — navigates to where the function, variable or label in question is declared with a simple hotkey or Ctrl+Click / ⌘Click.
Find Usages — helps you locate usages of any symbol (e.g., class, method, field, etc.) in your code, in the current file or in the whole project.