Skip to content
Advertisement

Downgrade PHP version Laravel 5.8

Is it possible to downgrade Laravel 5.8 PHP version to PHP 5? Searched around for resources yet I can’t find any.

I need to downgrade it so that I can upload it to our local ubuntu server.

Advertisement

Answer

Laravel 5.8 requires PHP >= 7.1.3 because the code written in Laravel Core and in other PHP Libraries required by Laravel uses features and functions that are available only on PHP >= 7.1.3.

An example is the usage of ?? (Null coalescing operator) which is supported only by PHP 7.1 and up.

In your case what you should do is utilize multiple PHP versions on your local server.

A guide on how to have multiple PHP versions using APACHE can be found in this StackOverflow question.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement