how to install php 8 (or oldest) in Windows 10
Get PHP ZIP files from https://windows.php.net/download/ , choose a latest version, I normally install Thread Safe Version!
Check if you has VC15 and VS16 installed in Window 10, if not, install from here https://aka.ms/vs/16/release/VC_redist.x64.exe or https://aka.ms/vs/16/release/VC_redist.x86.exe, according your Windows build.
Unzip PHP files into folder, sample:
Enter in folder and rename file php.ini-development to php.ini, open it in text editor
Uncomment the line extension_dir (only remove ; from the front), the result is:
extension_dir = "ext"
Uncomment lines of the extensions bz2, curl, fileinfo, gd, intl, mbstring, mysqli, openssl, pdo_mysql, pdo_pgsql, sodium, sqlite3, xsl …. example:
Note: extensions are allowed only removing “;” from the front
Copy PHP install folder and include in Path Variable (System Variables) in Windows Enviromnennt Variables, chose Path (System Variables), sample: C:\php\8.0
Open Power Shell and type
Results show php version
Download Composer from https://getcomposer.org/Composer-Setup.exe
Install from All Users
Uncheck Developer mode and click Next
Choose command line PHP executable and click next
Proxy normally is not necessary, click next, install, next and finish!
Open Power Sheel and run
composer create-project --prefer-dist laravel/laravel blog
php artisan serve
Open your browser and check if http://localhost:8000 show Laravel First Page