MacOS upgrade comes with PHP5.6 and upgrade to PHP7.1
Mac comes with version php5.6. Since php7 brings many new features and performance improvements, we decided to upgrade php7
Enter the following command to install php7. 1. Installation package. During the installation process, you need to enter the system password
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
Open the terminal and enter php -v. Why is it still prompted that the version is php5.6?
php-osx will not overwrite the original version. Instead, two PHP versions are installed. The root directory of the new version of PHP7.1 is /usr/local/php5, and the startup script path is /usr/local/php5/bin/php.
You can open the terminal, Temporarily adjust the system variable path by the following method (it will become invalid immediately after closing the terminal)
export PATH=/usr/local/php5/bin:$PATH
You can also permanently modify it by adding php7 to the environment variable by the following method
sudo vim ~/.bash_profile
Write in the file
#export PHP PATH This is a comment, you can delete it
export PATH=/usr/local/php5/bin:$PATH
Finally, run the following command
source ~/.bash_profile
After the installation is completed, php -m, you will find that even xdebug and Zend OPcache are also Installed together
The above is the detailed content of MacOS upgrade comes with PHP5.6 and upgrade to PHP7.1. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The following five methods can be used to open a macOS terminal: Use Spotlight Search through application folders Use Launchpad to use shortcut keys Command Shift U through terminal menus

To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.

How to view system name in macOS: 1. Click the Apple menu; 2. Select "About Native"; 3. The "Device Name" field displayed in the "Overview" tab is the system name. System name usage: identify Mac, network settings, command line, backup. To change the system name: 1. Access About Native Machine; 2. Click the "Name" field; 3. Enter a new name; 4. Click "Save".

Open a file in a macOS terminal: Open the terminal to navigate to the file directory: cd ~/Desktop Use open command: open test.txtOther options: Use the -a option to specify that a specific application uses the -R option to display files only in Finder

To restart the Apache server, follow these steps: Linux/macOS: Run sudo systemctl restart apache2. Windows: Run net stop Apache2.4 and then net start Apache2.4. Run netstat -a | findstr 80 to check the server status.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

macOS has a built-in "Screen Recording" application that can be used to record screen videos. Steps: 1. Start the application; 2. Select the recording range (the entire screen or a specific application); 3. Enable/disable the microphone; 4. Click the "Record" button; 5. Click the "Stop" button to complete. Save the recording file in .mov format in the "Movies" folder.

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.
