古いバージョンのphpが入ったxamppをダウンロード
今回はphp 7.4.11をダウンロードします。
Download XAMPP
Download XAMPP for Windows, Linux, and OS X. Older versions of Solaris are also available.




現在、使用中のxampp>phpフォルダの名前を変更します。
phpのバージョンが8.0.2だったので、既存のものをphp⇒php802に変更します。

ダウンロードして、解凍したxamppの中にあるphpだけを既存のフォルダに移動します。

現在、使用中のxampp>apache>conf>extraのhttpd-xampp.confをhttpd-xampp802.confに変更します。

ダウンロードして、解凍したxampp>apache>conf>extraのhttpd-xampp.confを移動します。

xamppのapacheを起動します。
phpのバージョンを確認します。

上が変更前、下が変更後です。
無事にphp 7.4.11になりました。