PhpStorm Features — Smart PHP IDE for Productive Coding
Intellijent Code Editor
PhpStorm features a rich and intelligent code editor for PHP with syntax highlighting, extended code formatting configuration, on-the-fly error checking, smart code completion, code folding and other features.
Language Features Support
PHP 5.4 is fully supported, including traits and all the syntax improvements: class member access on instantiation, short array syntax, array dereferencing on function call, binary literals, expressions in static calls, etc. PHP 5.3 for legacy projects is supported as well.
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.
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.
Code editor understands callback references within string literals, and provides advanced assistance such as usages search and rename refactoring.
PhpStorm transparently recognises PHAR-packaged code.
The existing support of template engines and command-line tools is boosted with a more high-level feature: a new MVC view for Symfony2 & Yii frameworks.
Smarty Templates Editing
Use the Smarty template engine to take advantage of 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; and custom Smarty delimiters support.
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.
The Rename and Move refactorings work for files, functions, constants, classes, properties, methods, parameters, and local and global variables.
The following refactorings are also available: Extract Variable / Constant / Field / Method, Inline variable, Push members Up / Pull members Down, Change signature.
Make global project changes easily and safely. Local changes are made instantly in-place.
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.
PHP Code Sniffer
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.
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.
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.
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
- Set up 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.
Read more about zero-configuration debugging with PhpStorm.
And when (in some cases) you still need to configure debugging manually, read this article: How to configure debugging in PhpStorm
Unit Testing With PhpUnit
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.
More on using PHPUnit with PhpStorm.
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.
Code Coverage for PHPUnit shows you how much of your code is covered with tests and marks covered and uncovered lines visually right in the editor. Code coverage analysis with PHPUnit is fully supported in the PhpStorm.
You can profile your applications right from the IDE with either xDebug or Zend Debugger. PhpStorm provides visual representation of profiling data generated by XDebug or Zend Debugger. You can select several snapshots at a time and collect the aggregated profiling information. Observe an aggregated report and jump from the execution statistics directly to the function in your PHP code.
DOM-Based, Browser-Specific completion
- 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.
Live Editing Preview saves you lots of time and key presses. Open a page in the editor and the browser so you can see both, and activate the Live Edit feature. Start editing the code and see the changes immediately in the browser even while you are going through the list options in code completion popups. PhpStorm auto-saves your changes, and the browser smartly updates the page on the fly, showing your edits.
Ecmascript harmony support
More front-end features »
Coding style support
PhpStorm contains a built-in PSR1/PSR2, Symfony2, Zend, and Drupal compliant code formatting and lets you easily specify your own project-specific coding standards for PHP CodeSniffer. Currently just reformatting your code in PhpStorm helps your code meet coding standards.
Most popular Version Control Systems are supported, including Subversion, Mercurial, Git, Perforce, CVS, and TFS.
For Git VCS IDE shows revisions graph.
The following features are available no matter which VCS you use:
All the tedious tasks (adding, removing and 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.
- Integrated changelists — group yourchanges 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
- Incoming changes view — see the code changes not yet integrated into your local copy
- Outdated changes notification — get warned if a file you are working with has been changed after your last sync
Databases & SQL
PhpStorm provides tools and code assistance features for work with database and SQL in your projects. You are able to connect to databases, edit schema as well as table data, run queries, and even analyze schema with UML diagrams. SQL code can be injected to other languages or edited in SQL Editor with syntax highlighting, smart code completion, on-the-fly code analysis, code formatting and navigation.
IDE 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 roll back to any of its previous versions.
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.
PhpStorm automatically completes and checks standard tags, properties, target names, path attribute values in build files.
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.
Integration with Issue Trackers
When your ToDo list is in an issue/bug tracking system, you can configure PhpStorm to work with the issues without switching from the IDE. Just specify your issue tracker server and:
- Select tasks to work on from the list defined by your filter
- Automatically group VCS changes under a corresponding task
- Commit to VCS with task name/ID pre-filled for you
- Switch between tasks keeping IDE context saved (open editor tabs, break points, etc.)
PhpStorm supports the following bug tracking systems: JetBrains YouTrack, Atlassian JIRA, Lighthouse, Pivotal Tracker, GitHub, Redmine, and Trac.
PhpStorm plugin repository contains 180+ IDE plugins of different nature, including support for additional VCS, integrations with different tools and frameworks, and editor enhancements such as Vim emulation.
PhpStorm plugins repository can be browsed and managed from the Plugin Manager in IDE Settings.
PhpStorm Plugin Repository web site.
Use the same environment on Windows, Mac OS and Linux.