Running php artisan serve command with different php versions
For Windows
:
to run different projects with its required PHP version you can include the required PHP path before writing artisan serve
:
C:\wamp64\bin\php\php7.0.33\php.exe artisan serve --host=127.0.0.1 --port=8000
C:\wamp64\bin\php\php7.4.9\php.exe artisan serve --host=127.0.0.1 --port=8500
For Linux (Ubuntu
):
/usr/bin/php8.0 artisan serve --host=127.0.0.1 --port=8000