Mac upgraded PHP to 5.6, but CLI php -v get 5.3.28?

前端 未结 4 1665
太阳男子
太阳男子 2020-12-17 00:26

I have installed MAMP (comes with PHP 5.5) on my machine. And localhost pointed to /Applications/MAMP/htdocs. The problem happened when I was trying to use composer in termi

4条回答
  •  轮回少年
    2020-12-17 01:03

    If you have upgraded using curl, copy & paste the following line of code and press enter.

    $ export PATH=/usr/local/php5/bin:$PATH

    Now, type $ php -v

    If done correctly, it should show the following

    PHP 5.6.23 (cli) (built: Jun 26 2016 13:17:47) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

提交回复
热议问题