0

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.

Belen
  • 673
  • 2
  • 10
  • 25
kwestionable
  • 496
  • 2
  • 8
  • 23
  • 1
    https://laravel.com/docs/5.8 "_Requirements: PHP >= 7.1.3_" Use a lower Laravel version then. Or upgrade to PHP7 on _your_ Ubuntu server – brombeer Oct 19 '19 at 11:14
  • Downgraded it to `5.5` now. Is it possible to follow this tutorial? https://medium.com/@abedxh/deploy-laravel-5-4-project-in-ubuntu-16-04-apache-based-server-538d4620bb97 the apache server required `PHP7` – kwestionable Oct 19 '19 at 11:19
  • 1
    5.5 you say ... https://laravel.com/docs/5.5 "_PHP >= 7.0.0_" 5.4 is the last version to use PHP5. – brombeer Oct 19 '19 at 11:21
  • Ohhh okay. Thank you. Is it possible to run Laravel 5.4 given the link that required PHP 7? – kwestionable Oct 19 '19 at 11:22
  • tbh I would do everything in your power to upgrade the server to php 7 – Flame Oct 19 '19 at 13:01

1 Answers1

2

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.

Zenel Rrushi
  • 2,346
  • 1
  • 18
  • 34