Home > Backend Development > PHP Tutorial > 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
Release: 2023-04-07 17:18:01
forward
3324 people have browsed it

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
Copy after login

2. Install the PHP version switching tool

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

3. View all currently installed PHP versions

# php-version
Copy after login

4. Switch the version

# php-version 5.6.5
Copy after login

5. Make the current PHP version effective

# sudo pkill php-fpm -D
# sudo pkill php-fpm
# sudo php-fpm -D
Copy after login

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!

source:www.fushengnan.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template