- Intelligent PHP Editor
- PHP 5.4 Language Features Support
- PHP code completion
- PHPDoc support
- Smart Duplicated Code Detector
- PHP Code Sniffer
- PHP refactoring
- Smarty templates editing
- Efficient project analysis and navigation
- Smart Environment
- PHP UML
- Drupal & Symfony2 Coding Style Support
- Version control systems integration
- Local history
- Phing Support
- PHPUnit, Debugger & Profiler
- Visual Debugger
- Profiler integration
- Lightweight IDE
- Use the same environment on Windows, Mac OS and Linux
- Open code from anywhere and start working in no time
- Includes all the features of WebStorm
- DOM-Based, browser-specific completion
- Code navigation and usages search
- ECMAScript Harmony Support
- Validation and quick-fixes
- More front-end features…
Intelligent PHP Editor
PhpStorm provides rich and intelligent code editor for PHP with syntax highlighting, extended code formatting configuration, on-the-fly error checking, and smart code completion.
PHP 5.4 Language Features Support
PHP 5.4 is now fully supported, including traits and all the new syntax improvements: class member access on instantiation, short array syntax, array dereferencing on function call, binary literals, expressions in static calls, etc.:
PHP code completion
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 supports array indexes in PHP code.
PhpStorm editor respects PHPDoc in your code and provides appropriate code completion suggestions based on @property, @method and @var 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.
Smart Duplicated Code Detector
Added for all major supported languages including even CSS and HTML. Go to 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 Refactor | Extract Method it’s easy to keep your code DRY.
PHP Code Sniffer
PhpStorm 4.0 allows you to check your code on the fly with PHP Code Sniffer (phpcs), 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.
The Rename refactoring works for files, functions, constants, classes, properties, methods, parameters, and local and global variables.
Also following refactorings are available:
- Introduce Variable
- Introduce Constant
- Introduce Field
- Inline variable
Make global project changes easily and safely. Local changes are made instantly in-place.
Smarty templates editing
With the PhpStorm IDE, you can use the Smarty template engine and take advantage of these productivity features when working with .tpl files:
- configurable syntax highlighting for keywords, strings, variables and braces
- syntax errors highlighting
- Smarty functions and attributes completion
- automatic insertion of paired braces, quotes and closing tags
- commenting of the selected block with a single hotkey
- custom Smarty delimiters support
More on Smarty support in PhpStorm.
Efficient project analysis and navigation
Its thorough source code analysis allows PhpStorm to provide sophisticated code completion even for unannotated code, for example:
- the function return type is deducted from its body and return statements
- 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 helps developers to understand and change their code by providing editable UML class diagrams for PHP code. You can quickly examine your application structure, create and edit classes and their relationships. Look for “Diagrams…” in context menus. Many refactorings can be applied directly from the diagram, via the shortcut menu.
Note that a diagram built from a source control change list or history provides a semantic view of changes – added classes, changed hierarchy, and changed properties.
Drupal & Symfony2 Coding Style Support
PhpStorm contains a bundled predefined coding styles for the popular Drupal content management platform and Symfony2 framework. Currently just reformatting your code in PhpStorm removes 99% of errors reported by Drupal coder-review and helps your code meet Drupal coding standards.
Version control systems integration
PhpStorm supports most popular Version Control Systems:
All the tedious tasks (adding, removing, deleting files) are performed automatically. A built-in visual merge tool resolves all conflicts in a quick and intuitive manner. The changes made locally are highlighted as you type in the editor gutter, providing intuitive navigation and a 2-click rollback for individual changes.
For Git VCS IDE shows revisions graph.
The following features are available no matter which VCS you use:
- Integrated changelists — group your changes into multiple change lists for better organization
- Shelved changes — set aside some changes to restore them later
- Repository changes view — see what has been committed by other team members
- UML view of changes — see UML section
- Incoming changes view — see the code changes not yet integrated into your local copy
- Outdated changes notification — get warned that a file you are working with has been changed after your last sync
PhpStorm tracks any changes made to your source files, protecting you from any accidental losses or modifications, even if made by other applications. At any time, you can inspect the history of either a particular file or directory and rollback to any of its previous versions. You can also set version labels.
PhpStorm automatically completes and checks standard tags, properties, target names, path attribute values in build files:
PHPUnit, Debugger & Profiler
Develop PHPUnit tests in PhpStorm and run them instantly from a directory, file or class using the context menu options.
Dedicated Run/Debug configurations allow you to run the appropriate set of tests at a later time.
Tests are executed in a dedicated Test Runner UI, displaying results overview and detailed stats for the whole suite and every particular test.
If a test fails, you can instantly jump from the stacktrace to the line of code where the error occurred.
More on using PhpUnit with PhpStorm.
PhpStorm provides numerous options for debugging your PHP code, so you can:
- Inspect context-relevant local variables and user-defined watches, including arrays and complex objects, and edit values on the fly.
- Setup remote debugging for your server.
- Evaluate an expression in runtime.
- Debug a page in multiple sessions simultaneously.
- Keep a debugging session alive while moving between pages.
You can use our browser bookmarklets, Zend Toolbar or XDebug toolbar to initiate debugging directly from any page in a modern browser such as Firefox, IE, Google Chrome or Safari.
And when (in some cases) you still need to configure debugging manually read this article: How to configure debugging in PhpStorm
Watch our video on how to configure remote debugging:
You can profile your scripts right from PHPStorm with either xDebug and Zend Debugger. You can see an aggregate report and jump from the execution statistics directly to the function in your PHP code.
Open code from anywhere and start working in no time
Open an existing folder, check out the code from a VCS, or even specify your FTP to download and auto-sync your files with. You’re up and running in mere moments.
Edit project files locally and deploy back to remote server using automatic synchronization, either on file save or on demand.
Web resource folders are quickly configured via Settings|Directories — note the “Resource Root” marker button. Just mark your JS/CSS/other folders to get proper completion and code analysis.
DOM-Based, browser-specific completion
Code navigation and usages search
- Go to declaration — navigates to where the function, variable or label in question is declared with a simple hotkey or Ctrl+Click⌘Click.
- Go to symbol — navigates to any symbol in project code using search patterns, including asterisk (*) and/or CamelHump abbreviations.
ECMAScript Harmony Support
- Extract Variable/Function
- Inline Variable/Function
- Safe Delete
- Extract embedded script into file
- Customizable breakpoint properties: suspend mode, conditions, pass count and more
Validation and quick-fixes
PhpStorm detects and suggests auto-fixes for such problems as:
- missing required attributes
- invalid attributes or illegal values
- wrong references to files in links
- duplicate attributes
- invalid CSS selector format
- invalid CSS properties
- unused CSS class definitions
- invalid local anchors and more…