PHP

 
 
PHP (= Hypertext Preprocessor) is an HTML-embedded server-side scripting language.

PHP is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE information.

More information about PHP can be found at: http://www.php.net

PHP manuals can be found at:
http://www.php.net/manual/en/
http://devzone.zend.com/manual/

The latest PHP version can be downloaded from: http://www.php.net/downloads.php







Upgrade PHP on macOS using binaries from liip.ch.



Information
This tutorial describes what to do if you have installed a PHP version using command:
curl -s https://php-osx.liip.ch/install.sh | bash -s X.X
and you want to install a different PHP version on the macOS.

If you have never used https://php-osx.liip.ch/install.sh before, see tutorial:
Installing PHP5.6.30 on macOS Sierra

Operating system used
macOS Sierra

Software prerequisites
None

Procedure
  1. If you have installed a PHP version using https://php-osx.liip.ch/install.sh, it will be installed in path:
    /usr/local

    For example you have previously installed PHP 5.6.30:
    /usr/local/php5-5.6.30-20170506-093822
    and a symbolic link php5 -> /usr/local/php5-5.6.30-20170506-093822 is created.

  2. On the website https://php-osx.liip.ch a new release is available, for example: PHP 5.6.31

  3. To install the new version type:
    curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6

    Note: It will always install the latest "patch" version, in this case: 5.6.31

  4. The new PHP version is installed in path:
    /usr/local/php5-5.6.31-20170817-164511
    and a symbolic link php5 -> /usr/local/php5-5.6.31-20170817-164511 is created.

  5. If you have installed multiple PHP versions and want to switch versions, use the following command to change the symbolic link:

    sudo ln -sf /usr/local/php5-5.6.30-20170506-093822 php5