Skip to content

Instantly share code, notes, and snippets.

View ngocnd0242's full-sized avatar
🎯
Focusing

Ngoc Ngo Dinh ngocnd0242

🎯
Focusing
  • Hà Nội
  • 03:23 (UTC +07:00)
View GitHub Profile
@ngocnd0242
ngocnd0242 / SwitchPhp.sh
Created April 1, 2019 16:21 — forked from labbots/SwitchPhp.sh
Bash script to switch between available PHP versions in Ubuntu. (Tested in Ubuntu 16.04)
#!/bin/bash
# Check if ran with root permissions
if [ `id -u` -ne 0 ]; then
printf "The script must be run as root! (you can use sudo)\n"
exit 1
fi
function arrayContains {
local e match="$1"