Initial PHP 5.5 support in PhpStorm

Posted on by Maarten Balliauw

With the Early Access Program for PhpStorm 7, we’ve added initial support for PHP 5.5. When working in a project making use of the new PHP 5.5 language constructs, we can switch to the PHP 5.5 language level in PhpStorm and get full code completion and syntax checking support from the IDE.

Let’s have a look at these new language features!


Generators provide an easy and readable way for implementing iterators. Take a foreach: the iteration will be run for every value that was returned with the new yield keyword.

The following class can run a closure on every element of an array and “yields” the mapped value:

Some additional examples are available on the RFC page.


The finally keyword allows for cleaning up after an exception has been thrown. For example, when using a database connection we may end up with an Exception thrown by a called function. Using the finally keyword, we can gracefully close this connection regardless of the fact an exception occured or not.

Using list in foreach

A nice and handy new feature in PHP 5.5 is the ability to use list() in a foreach loop. Take the following code snippet:

Using PHP 5.5 we are able to transform each array entry into a list of variables which we can use in our code. Additionally, PhpStorm provides syntax highlighting as well as code completion!

Class name resolution as scalar

Reflection is great, and being able to instantiate a class from a string variable is even better. But why is that we always tend to make typos in strings… Using the ClassName::class syntax, we can get the class name as a string with full IDE support.

Other enhancements

A number of other enhancements for PHP 5.5 language features have been added. PhpStorm now supports empty() and isset() on expressions. It can even resolve const array/string dereferencing, like for instance providing the output of str_repeat(“foobar”[3], 3)[1]”).

Give PhpStorm 7 EAP and PHP 5.5 a try and let us hear your thoughts in the issue tracker, comments below or in our forums!

Develop with pleasure!
– JetBrains PhpStorm Team

Comments below can no longer be edited.

9 Responses to Initial PHP 5.5 support in PhpStorm

  1. Pavel says:

    July 17, 2013

    Thank you for good news, but as I understand your release cycle, we will see release of PHPStorm 7 in early 2014? Is it true, or we will get release earlier, or maybe you will release PHP 5.5 support with some PhpStorm 6 release?

  2. Rohit says:

    July 23, 2013

    Thank you for good new in PHP 5.5

  3. Derek says:

    August 26, 2013

    Are there any plans to add 5.5 support to the php module for IntelliJ 12.x?

    • Mikhail Vink says:

      October 24, 2013

      No, IntelliJ IDEA 13 EAP and further – available from 22nd October.

  4. PhpStorm 7.0 released: PHP 5.5, Vagrant, SSH console, debugger config validation, Drupal, frameworks & more | JetBrains PhpStorm Blog says:

    October 22, 2013

    […] language support: PHP 5.5, improved PHP syntax coloring for various constructs, type inference and PHPDoc improvements, new […]

  5. PhpStorm 7.0リリース | JetBrains ブログ says:

    October 23, 2013

    […] PHP 言語サポート: PHP 5.5をサポートし、PHPシンタックスカラーリングも改善されておりコンストラクト、タイプインターフェース、PHPDocが見やすくなりました。またスタティックメンバの移動やインターフェースの抽出といった新しいリファクタリング、インスペクションやクイックフィックスも充実しています。 […]

  6. Już jest PhpStorm 7.0: PHP 5.5, Vagrant, SSH, wsparcie frameworków i inne | webMASTAH says:

    October 24, 2013

    […] wsparcie dla PHP 5.5 – oprócz dodania obsługi nowości z 5.5 usprawniono także kolorowanie (wreszcie, zawsze narzekałem, że Storm koloruje gorzej niż NetBeans) […]


Subscribe for updates