Laravel Installing PHP and Composer
Composer is a tool that installs PHP packages. A package is a bundle of ready-made PHP code, and Laravel itself is a package.
Check PHP
Run this command to see the PHP version.
php -vCheck Composer
Run this command to see the Composer version.
composer --versionExample
php -v
composer --versionKey points
- Composer: a tool that installs PHP packages.
- Package: a bundle of ready-made PHP code.
- PHP runs the code, and Composer fetches the code.
- Laravel 13 needs PHP 8.3 or newer.
- Check both tools from the terminal before you start.
In this example, the first line checks the PHP version. The second line checks the Composer version. Both tools must answer before you install Laravel.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
What does Composer install?