Unclear on the difference of using a different PHP version in Language Level and CLI Interpreter

Our project was built in PHP 5.6, but I'm unable to get that version running on my "new" Mac Catalina (it came pre-installed and configured with it) ... and because PHP 5.6 needs a bunch of security downgrades to get it to run on a fresh Catalina install, I got our project working on PHP 7.3 (there was a particular issue with 7.4 that took too long to try to figure out).

Now, I'd like PHPStorm to run suggestions and validations with PHP 5.6 so that my changes won't break stuff on our staging (QA) and production (Prod) servers (as in, inadvertently committing PHP 7+ changes that won't work on 5.6, because I don't have all of the breaking differences memorized all of the time)... 

So, in PHPStorm (macOS) > Preferences > Languages & Frameworks > PHP, I set "PHP language level" to 5.6, but then for "CLI Interpreter" I selected PHP 7.3 because that's what's installed and working... I don't know however if I should even have selected that (as opposed to leaving it empty), or if that could introduce problems with my usage of PHPStorm in the project or allow me to easily accidentally commit breaking changes.

I tried reading JetBrains documentation on this and am left a little confused due to the terminology etc, so I'm not sure what I'm looking at here.

https://www.jetbrains.com/help/phpstorm/php.html

PS the Symfony version is 3.4, though I don't know if that matters here.

1 comment
Comment actions Permalink

The PHP version gotten from the interpreter does not matter much in terms of the capabilities. All analysis is performed according to the Language Level: https://www.jetbrains.com/help/phpstorm/supported-php-versions.html

0

Please sign in to leave a comment.