Search code examples
laravellaravel-5environmentphp-8

How Can I use php 8 for my laravel 5* project


Is there any way to use php 8 or hiugher for my laravel 5* project. Please suggest.

I don't want to increase my laravel version but php.


Solution

  • You cannot. Laravel 5.x is compatible with PHP 7.x. If you want to use PHP 8.x you must upgrade your Laravel project.

    Here you have the link to check Laravel 5.x requirements:
    https://laravel.com/docs/5.7#server-requirements

    And here is the Laravel 8 and Laravel 9 server requirements:
    https://laravel.com/docs/9.x/releases#php-8
    https://laravel.com/docs/8.x/upgrade#php-7.3.0-required

    Also here is a package for a fast Laravel upgrade process. :)
    https://laravelshift.com/