install php powerchell code example

Example 1: install php windows 10

1. Download Thread safe 32/64 bit zip package PHP8 from 
   https://windows.php.net/download#php-8.0
2. Extract the zip package and paste the extracted folder onto your 
    desired drive( Drive C:\ for example)
3. Rename the folder to php8( or any name that you like)
4. One this folder and look for php.ini-development file
5. Make a copy of this file and rename copy version to php.ini
6. Open php.ini file with your preferred text editor and uncomment PHPIniDir “ext”
7. Save the file and close the editor.

## Set PHP 8 to System's Path
1. Open php8 folder and copy and folder path
2. Press Windows Key on your keyboard and type 'variable' and hit Enter
3. Click Environment Variables
4. Click Edit and Click NEW on the right
5. Paste the php8 folder path
6. Click OK, OK, OK

## Installing composer
Run the following commands
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '795f976fe0ebd8b75f26a6dd68f78fd3453ce79f32ecb33e7fd087d39bfeb978342fb73ac986cd4f54edd0dc902601dc') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

QUICK QUESTION: Have you heard of Windows SubSystem for Linux (wsl)? 
Check it out

Example 2: php 5 windows

pub   2048D/5DA04B5D 2012-03-19
      Key fingerprint = F382 5282 6ACD 957E F380  D39F 2F79 56BC 5DA0 4B5D
uid                  Stanislav Malyshev (PHP key) <[email protected]>
uid                  Stanislav Malyshev (PHP key) <[email protected]>
uid                  Stanislav Malyshev (PHP key) <[email protected]>