Last active
January 17, 2024 02:34
-
-
Save djravine/376e81a018ba2b980750a5578deb3935 to your computer and use it in GitHub Desktop.
'.bash_aliases' - DEV - Change PHP Version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aliases - PHP | |
alias apache.restart='sudo service apache2 restart' | |
alias php.install='sudo apt install php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 php8.0 php8.1 php8.2 php8.3' | |
alias php.uninstall='sudo apt remove php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 php8.0 php8.1 php8.2 php8.3' | |
alias php.info='php -i' | |
alias php.version='php -v' | |
alias php5.6on='sudo a2enmod php5.6 && sudo update-alternatives --set php /usr/bin/php5.6' | |
alias php5.6off='sudo a2dismod php5.6' | |
alias php7.0on='sudo a2enmod php7.0 && sudo update-alternatives --set php /usr/bin/php7.0' | |
alias php7.0off='sudo a2dismod php7.0' | |
alias php7.1on='sudo a2enmod php7.1 && sudo update-alternatives --set php /usr/bin/php7.1' | |
alias php7.1off='sudo a2dismod php7.1' | |
alias php7.2on='sudo a2enmod php7.2 && sudo update-alternatives --set php /usr/bin/php7.2' | |
alias php7.2off='sudo a2dismod php7.2' | |
alias php7.3on='sudo a2enmod php7.3 && sudo update-alternatives --set php /usr/bin/php7.3' | |
alias php7.3off='sudo a2dismod php7.3' | |
alias php7.4on='sudo a2enmod php7.4 && sudo update-alternatives --set php /usr/bin/php7.4' | |
alias php7.4off='sudo a2dismod php7.4' | |
alias php8.0on='sudo a2enmod php8.0 && sudo update-alternatives --set php /usr/bin/php8.0' | |
alias php8.0off='sudo a2dismod php8.0' | |
alias php8.1on='sudo a2enmod php8.1 && sudo update-alternatives --set php /usr/bin/php8.1' | |
alias php8.1off='sudo a2dismod php8.1' | |
alias php8.2on='sudo a2enmod php8.2 && sudo update-alternatives --set php /usr/bin/php8.2' | |
alias php8.2off='sudo a2dismod php8.2' | |
alias php8.3on='sudo a2enmod php8.3 && sudo update-alternatives --set php /usr/bin/php8.3' | |
alias php8.3off='sudo a2dismod php8.3' | |
alias php5.6='php7.0off && php7.1off && php7.2off && php7.3off && php7.4off && php8.0off && php8.1off && php8.2off && php8.3off && php5.6on && apache.restart && php.version' | |
alias php7.0='php5.6off && php7.1off && php7.2off && php7.3off && php7.4off && php8.0off && php8.1off && php8.2off && php8.3off && php7.0on && apache.restart && php.version' | |
alias php7.1='php5.6off && php7.0off && php7.2off && php7.3off && php7.4off && php8.0off && php8.1off && php8.2off && php8.3off && php7.1on && apache.restart && php.version' | |
alias php7.2='php5.6off && php7.0off && php7.1off && php7.3off && php7.4off && php8.0off && php8.1off && php8.2off && php8.3off && php7.2on && apache.restart && php.version' | |
alias php7.3='php5.6off && php7.0off && php7.1off && php7.2off && php7.4off && php8.0off && php8.1off && php8.2off && php8.3off && php7.3on && apache.restart && php.version' | |
alias php7.4='php5.6off && php7.0off && php7.1off && php7.2off && php7.3off && php8.0off && php8.1off && php8.2off && php8.3off && php7.4on && apache.restart && php.version' | |
alias php8.0='php5.6off && php7.0off && php7.1off && php7.2off && php7.3off && php7.4off && php8.1off && php8.2off && php8.3off && php8.0on && apache.restart && php.version' | |
alias php8.1='php5.6off && php7.0off && php7.1off && php7.2off && php7.3off && php7.4off && php8.0off && php8.2off && php8.3off && php8.1on && apache.restart && php.version' | |
alias php8.2='php5.6off && php7.0off && php7.1off && php7.2off && php7.3off && php7.4off && php8.0off && php8.1off && php8.3off && php8.2on && apache.restart && php.version' | |
alias php8.3='php5.6off && php7.0off && php7.1off && php7.2off && php7.3off && php7.4off && php8.0off && php8.1off && php8.2off && php8.3on && apache.restart && php.version' |
Updated for PHP8.0 and PHP8.1
Updated for PHP8.2 and PHP8.3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for PHP7.4