Fluffy Fluffy - 7 months ago 45
PHP Question

How can I set the PHP version in PHPStorm?

Is it possible to set the PHP version value, say 4.0+ and have PHPStorm highlight functions that wouldn't work with the oldest version? For example, for PHP4 this should highlight

static function
etc. I have a PHP installation on my PC but I don't want to install an older PHP version for every small script I have to produce.



so, you mean to highlight all pieces of code that will not work in the version you are writing it, right? That can be done in:

Preferences -> Languages & Frameworks > PHP

enter image description here

then select your version, for example, 7.0

This is very useful when your local is in 7.0, for example, but production is in 5.5. That way phpstorm will warning you which parts will not work in production.