Skip to content

Latest commit

 

History

History
126 lines (82 loc) · 4.6 KB

README.md

File metadata and controls

126 lines (82 loc) · 4.6 KB


logo

s-php :- version switcher for linux

OS Bash Script GitHub issues GitHub code size in bytes GitHub last commit

If you're on linux system with PHP installed via apt, you may be looking for an easy way to switch between PHP versions (5.6, 7.0, 7.1, 7.2 etc) without executing multiple commands manually. Well, this package is it.

Installation

Clone this repository to your local machine using below command.

git clone https://github.com/vinugawade/s-php.git

Move the script using below command.

sudo mv /location/of/file /usr/local/bin

Allow everyone to execute the script, use below command.

sudo chmod +x /location/of/file

OR

sudo chmod 0755 /location/of/file

Add /usr/local/bin to your $PATH. If you use the Bash shell,Then you can do this by running below command.

export PATH=$PATH:/usr/local/bin

OR

export PATH=$PATH:/location/of/file

This will set the variable name: potentially in a file called ~/.bash_profile, ~/.bashrc or ~/.profile. The difference between these files is (primarily) when they get read by the shell. If you're not sure where to put it, then ~/.bashrc is a good choice.

You may need to restart your shell for this to take effect.

Usage

Now you can use the script from anywhere in Terminal. below are some examples.

s-php 5.6
s-php 7.4
s-php 8.0

Check below attached GIF. Run s-php script

Mac User?

Check this :- sphp Repository.

Contribution

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repository to your local machine.

Step 2

  • Make Changes! 🔨 ✏️ ⌨️

Step 3

  • 🔃 Create a new Pull Request.

Maintainer ✨

Connect with me :-

vinugawade vinugawade vinu-gawade vinugawadevr

Made With

By Vinay Gawade.

LinkedIn QR Buy Me Coffe QR Twitter QR

Buy Me A Coffee


License

Check here.

LICENSE