-
-
Save zafranf/93aaadaa139ddc72280516bbdcbd220d to your computer and use it in GitHub Desktop.
macOS switch php version
This file contains hidden or 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
| #!/bin/bash | |
| echo "###########################" | |
| echo "# Choose PHP Version #" | |
| echo "###########################" | |
| echo "1) [email protected]" | |
| echo "2) [email protected]" | |
| echo "" | |
| echo "0) exit" | |
| echo | |
| printf 'choose [1/2/0] : ' | |
| read -r i | |
| case "$i" in | |
| 1) echo "Changing PHP Version to 7.4" | |
| brew unlink [email protected] | |
| brew unlink [email protected] && brew link --force --overwrite [email protected] | |
| ;; | |
| 2) echo "Changing PHP Version to 8.1" | |
| brew unlink [email protected] | |
| brew unlink [email protected] && brew link --force --overwrite [email protected] | |
| ;; | |
| *) echo "Exit" | |
| exit 0 | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment