To use multiple php in window we will use software called Laragon
According to the Laragon official site it is a portable, isolated, fast & powerful universal development environment for PHP, Node.js, Python, Java, Go, Ruby. It is fast, lightweight, easy-to-use and easy-to-extend.
How to Install Laragon
Go to Laragon’s official download site and download the latest version of the appropriate installer for your version of Windows. For the 64-bit Windows users, download either the Full or Lite edition. For the purpose of this article, we will be using the full edition.
After download install Laragon
After install start Laragon.
Right click on Web button. currently it show PHP default version.
How to Install multiple php
Check your pc system type
Go to window tab type PC right click on “Properties:
See “System type”
Now go to link to download PHP. download PHP according your “System type”.
I have download PHP version 7.4.33 and 8.3.2
Copy, paste and extracted downloaded version in Laragon install directory.
here my root folder is “D:\laragon\bin\php”
Again Right click on Web button.Choose your PHP version
Start Laragon by click “Start All” button
Type “http://localhost/” in browser. You can see PHP version
How to Add phpMyAdmin Laragon
Laragon does not have phpMyAdmin so we need to install it.
Download it from link , extract the archive to the D:\laragon\etc\apps (if you use the default laragon installation directory) and name the folder as phpMyAdmin
Next go to “D:\laragon\etc\apps\phpMyAdmin” folder
Rename file “config.sample.inc.php” to “config.inc.php”
Now open file “config.inc.php”.
Change
$cfg[‘Servers’][$i][‘AllowNoPassword’] = false;
to
$cfg[‘Servers’][$i][‘AllowNoPassword’] = true;
Stop and restart Laragon again.
Type url “http://localhost/phpmyadmin”
add username “root” leave password blank
How to run PHP project
To run php project go to folder “D:\laragon\www” and create your project