Home>Article>Backend Development> Mac switches PHP version and makes the current PHP version take effect

Mac switches PHP version and makes the current PHP version take effect

angryTom
angryTom forward
2019-10-16 11:22:17 3201browse

Mac switches PHP version and makes the current PHP version take effect

1. Install different versions of PHP

(Recommended learning:PHP video tutorial)

# brew install php56 # brew install php70

2. Install the PHP version switching tool

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

3. View all currently installed PHP versions

# php-version

4. Switch the version

# php-version 5.6.5

5. Make the current PHP version effective

# sudo pkill php-fpm -D # sudo pkill php-fpm # sudo php-fpm -D

At this time, the current PHP version in phpinfo() It took effect

The above is the detailed content of Mac switches PHP version and makes the current PHP version take effect. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:www.fushengnan.com. If there is any infringement, please contact admin@php.cn delete
Previous article:Laravel batch insert data Next article:Laravel batch insert data