PHP Classes

Multiple PHP Versions Windows: Switch the version of PHP that will run on Windows

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 73 All time: 10,058 This week: 189Up
Version License PHP version Categories
multiphp 1.0.0MIT/X Consortium ...5PHP 5, Console, Windows


This package can switch the version of PHP that will run on Windows.

It can take as a parameter the version of PHP that you wish to use to run PHP scripts when they execute from the command line.

The class can write a batch script named PHP.BAT that executes the specified version of the PHP CLI executable program passing to PHP any parameters to that batch script.

Innovation Award
PHP Programming Innovation award nominee
December 2021
Number 7
When you develop code for other developers, it is always good to test that code on different versions of PHP, so the code is ready to handle the differences between the different versions of PHP.

This package creates a batch script for Windows named PHP.BAT that can be changed to run different versions of the PHP CLI version installed in the current computer.

This way, it is easy to switch the version of PHP that testing code will use.

Manuel Lemos
Picture of Isa Eken
  Performance   Level  
Name: Isa Eken <contact>
Classes: 18 packages by
Country: Turkey Turkey
Age: 20
All time rank: 293747 in Turkey Turkey
Week rank: 483 Up8 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 12x




  • Clone this repo: ```git clone```
  • Move repo to secure folder example: ``C:\dev\multiphp``
  • Install dependencies: ```composer install --no-dev --optimize-autoloader```
  • Add path to environment variables
  • Run ```multiphp``` command in your terminal and enter binary directory & environment directory - Example binary directory: ```C:\dev\bin``` - Example environment directory: ```C:\dev\php```
  • Download & configure php versions (7.3, 7.4, 8.0, 8.1) to environment directory - Example: ```C:\dev\php\8.1\php.exe```

Change PHP environment

Open terminal and run

multiphp change version=8.1
  Files folder image Files  
File Role Description
Plain text file composer.json Data Auxiliary data
Plain text file LICENSE Lic. License text
Plain text file multiphp Example Example script
Plain text file multiphp.bat Data Auxiliary data
Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,058
This week:189Up