@adityar15 Sail is a Docker-based development environment. As it’s Docker, all the software (PHP, MySQL, etc) is contained within “images”. So, the “pro” to this approach is, you can install versions of PHP, MySQL, etc you need to run your project without having to actually install them on your computer. If you’re not actually installing these things on your computer, then that means you can also use multiple versions of each.
For example, if you work on a legacy project that needs PHP 8.0 and a newer project that needs PHP 8.2, you can just work with different PHP images for those projects; you don’t have to mess about installing different versions of PHP on your computer, or updating symlinks or whatever between different installations. You just run sail up and you have the environment with the versions of things your project has declared.
With having versions of PHP contained in images, it also cuts out the issue that I see crop up time and time and time again: trying to install Composer dependencies, but then Composer complaining it wants a different PHP version:
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0".
This happens if you try and install Composer packages using an older version of PHP. You won’t get this error if you install your dependencies using the PHP version contained in the Docker image for your project, be that a new or old version of PHP. You’ll be using the version of PHP your project (and its dependencies) require.