PHP 7.0 reached end of life on 03 Dec 2018 and is no longer being updated. It's strongly recommended to upgrade to the latest version as soon as possible. You can read the official PHP migration guide here.
Installing PHP 7.0 on Server 2022
Prerequisites
Windows Server 2022 installed and up to date
Administrative access to the server
Internet connection for downloading PHP
IIS (Internet Information Services) role installed
Installation
Download PHP 7.0 from the official PHP website
Extract the downloaded ZIP file to C:\PHP7
Rename php.ini-production to php.ini
Edit php.ini and set the extension_dir to "C:\PHP7\ext"
Open IIS Manager and navigate to the server node
Open "Handler Mappings"
Click "Add Module Mapping" and enter the following:
Request path: *.php
Module: FastCgiModule
Executable: C:\PHP7\php-cgi.exe
Name: PHP_via_FastCGI
Click "OK" and then "Yes" to create a FastCGI application
Restart IIS
Verification
Create a new file named phpinfo.php in C:\inetpub\wwwroot
Add the following content to phpinfo.php:
<?php phpinfo(); ?>
Open a web browser and navigate to http://localhost/phpinfo.php
If PHP is installed correctly, you should see the PHP information page