I am testing a Custom Module on Magento 2.1.12 and Magento 2.2.3, I am using Lampp with php version 7.1.3, which is supportive for magento 2.2.3 but not for magento 2.1.12.

What is the solution for this problem?


Table comparison

So you can use: 7.0.2, 7.0.4, 7.0.6-7.0.x

you should use php 7.0.2.

i’m running 7.0.2 too.

can run both 2.1.x and 2.2.x

| improve this answer | |

I'd strongly recommend NOT to simply take the short answer, which appears to be 7.0.2, 7.0.4, 7.0.6–7.0.x.

There are other factors that may play into the compatibility, and to simply ask, "...which PHP version works for...?", would be an answer for some but not for others.

You should refer to documentation Magento has provided through their DevDocs. In addition to listing compatible versions of PHP that Magento2 can handle, PHP configuration settings that are recommended or required are listed too.

Magento 2.2.x Technology Stack Requirements

Magento 2.1.x Technology Stack Requirements

Magento 2.0.x Technology Stack Requirements

Please keep in mind that there are other solutions beyond trying to find a single version of PHP for them. Multiple versions of PHP can be used on the same server but differ across vhosts, for example. Try reading something like this: https://medium.com/@sbuckpesch/run-multiple-php-version-on-the-same-server-using-php-fpm-and-xdebug-on-ubuntu-16-04-6a84f5b7d7ce

| improve this answer | |

Your Answer

