Home  >  Article  >  Backend Development  >  How to install php on Apple computer

How to install php on Apple computer

王林
王林Original
2020-08-05 13:41:062844browse

How to install php on Apple computers: 1. Open the terminal and add the source; 2. Execute the [brew search php] command to view the php version; 3. Execute the [brew install php version] command to install php.

How to install php on Apple computer

First open [terminal], execute the command [brew tap exolnet/homebrew-deprecated], and add the source operation;

(recommended tutorial : php graphic tutorial)

Note: The adding source operation may fail due to network reasons, just try a few more times.

How to install php on Apple computer

Then execute the command [brew search php] to query all versions of php;

How to install php on Apple computer

(Video tutorial recommendation: php video tutorial)

Finally execute the command [brew install specify version name] to install php5.6;

How to install php on Apple computer

If there are multiple For different versions of php, you can switch the php version through the following commands.

brew unlink php56      
brew link php71

The above is the detailed content of How to install php on Apple computer. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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