Back to the PHP version installed with Brew on Mac

Source: Internet
Author: User
Yesterday, after brewupadtebrewupgrade, phpunit showed a variety of F, which was originally caused by a bugfix of php5.5.17. To temporarily use phpunit normally, you can only roll back the php version. You can use brewlink and brewunlink to switch different versions of php installed by brew. For example

Yesterday, after brew upadte brew upgrade, phpunit encountered various F types. I checked that it was caused by a bug fix in php 5.5.17. To temporarily use phpunit normally, you can only roll back the php version. You can use brew link and brew unlink to switch different versions of php installed by brew. For example

Just a little yesterdaybrew upadte & brew upgradeThen phpunit has various F types, which are due to a bug fix in php 5.5.17. To temporarily use phpunit normally, you can only roll back the php version.

Version Switch Mode

Php installed through brew can bebrew linkAndbrew unlinkTo switch between different versions.

For example

brew listbrew unlink php56brew link php55

Available for major versionsbrew listIf it is a minor version, you can only/usr/local/Cellar/php55Read it. Usephp-versionIt is more convenient.

Install php-version

Php-version is a tool that helps you manage php version switching installed from brew.

Easy to install

brew install php-version

Then execute

source $(brew --prefix php-version)/php-version.sh && php-version 5
Use php-version

Direct execution

php-version

You can see the current version, such as my own

$ php-version  5.5.15* 5.5.16  5.5.17

Run the following command to switch between them:

php-version 5.5.15

Check the php version again.

Original article address: roll back the PHP version installed with Brew on Mac. Thank you for sharing it with me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.