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)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-12-12 (9 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 68 All time: 10,068 This week: 237Up
Version License PHP version Categories
multiphp 1.0.0MIT/X Consortium ...5PHP 5, Console, Windows
Description Author

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: 298747 in Turkey Turkey
Week rank: 16 Up1 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 12x

Details

MultiPHP

Installation

  • Clone this repo: ```git clone https://github.com/isaeken/multiphp.git```
  • 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 README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:68
This week:0
All time:10,068
This week:237Up
For more information send a message to info at phpclasses dot org.