Skip to content

Instantly share code, notes, and snippets.

@liujingyu
Last active July 11, 2017 07:45
Show Gist options
  • Save liujingyu/116048018ecd74aaf8f2bf63b33ac2a1 to your computer and use it in GitHub Desktop.
Save liujingyu/116048018ecd74aaf8f2bf63b33ac2a1 to your computer and use it in GitHub Desktop.
PHP 在Mac上 多版本管理

mac php multi versions

brew install php-version
source $(brew --prefix php-version)/php-version.sh && php-version 7

example:

localhost:~ Ken$ php-version
  5.5.30
* 5.6.17
  7.0.2
localhost:~ Ken$ php-version 7.0.2
localhost:~ Ken$ php -v
PHP 7.0.2 (cli) (built: Jan  7 2016 10:40:26) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
localhost:~ Ken$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment