Switch between your installed PHP versions. This script requires Homebrew.
Download this code and copy it to /usr/local/bin/. For example:
$ cp switch-php.sh /usr/local/bin/switch-php && chmod +x /usr/local/bin/switch-php
or download it via curl:
$ curl -L https://raw.githubusercontent.com/viktorruskai/switch-php/master/switch-php.sh > /usr/local/bin/switch-php && chmod +x /usr/local/bin/switch-php
Use command switch-php
followed by a PHP version number. For example:
$ switch-php 7.4
This project is licensed under the MIT license.