PHP 8.1 conflict for development


I am working to set up a local development environment to service my website on Infinityfree. With the advice of the administrators, I have installed MySQL 8.1 without fear of conflict with MySQL 5.7.

I am having difficulties now possibly with PHP 7.4. For some reason I cannot get myphpadmin to work in localhost

Question: Is it possible to use PHP 8 for my local development environment? I believe Infinityfree still uses PHP 7.4. Would there be a conflict in my using PHP 8 locally?


Yes, most likely there will be issues, as there are different functions and implementations, and it is generally bad practice to develop one one platform for another (the platform being different PHP versions).


Yes, I strongly recommend to use the same PHP version in development. PHP 8 actually comes with new language features that are not available with PHP 7.4.

If you’re developing the software completely from scratch, you may be fine.

But if you’re using external libraries with Composer, for example, then those libraries may use PHP 8.0/8.1 specific features which will break on PHP 7.4. Then you absolutely have to make sure that you’re using libraries and versions that support PHP 7.4.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.