A PowerShell module that implements functions to install PHP with interactive menu I use phpmanager, more info here : https://github.com/mlocati/powershell-phpmanager
Install-Module -Name PhpConfig
Show-PhpConfig
Install-PhpFull -version 8.1-nts-x86 -ext common,com,odbc,mysql,imagick,sqlsrv,opcache,xdebug -mode dev
Set-PhpExtension -ext common,com,odbc,mysql,imagick,sqlsrv,opcache,xdebug -path C:\php\php-8.1-nts-x86
Set-PhpMode -mode dev -path C:\php\php-8.1-nts-x86
Set-PhpMode -mode prod -path C:\php\php-8.1-nts-x86
Set-PhpLimit -limit classic -path C:\php\php-8.1-nts-x86
Set-PhpLimit -limit high -path C:\php\php-8.1-nts-x86
Set-PhpSwitcher
Switch-Php 7.4
Switch-Php 8.1
Set-PhpIIS -site mysite.local -path C:\php\php-8.1-nts-x86