Mac OS X Mojave中的PHP之谜

时间:2019-01-03 18:30:01

标签: php macos apache macos-mojave php-ini

我在Mac OS X Mojave上。我不知道为什么我的PHP具有diff版本。

php --version ,我得到

PHP 7.1.4 (cli) (built: May  6 2017 10:02:00) ( NTS )                            
Copyright (c) 1997-2017 The PHP Group                                            
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies                    
    with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies      

哪个php ,我

/usr/local/php5/bin/php                                                          

php -i | grep php.ini ,我得到

Configuration File (php.ini) Path => /usr/local/php5/lib                        
Loaded Configuration File => /usr/local/php5/lib/php.ini 

printenv ,我知道了

TERM=xterm-256color
SHELL=/bin/bash
CLICOLOR=1
TMPDIR=/var/folders/54/y_678c6n7q7_pgk1v5lkzwnr0000gp/T/
SSH_CLIENT=10.20.100.88 49732 22
OLDPWD=/Users/bheng
SSH_TTY=/dev/ttys016
USER=bheng
LSCOLORS=ExFxBxDxCxegedabagacad
MAIL=/var/mail/bheng
PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/opt/curl/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/sbin:/usr/local/php5/bin:/Users/bheng/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/pgsql/bin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/mysql/bin
PWD=/Users/bheng/Desktop
SHLVL=1
HOME=/Users/bheng
GREP_OPTIONS=--color=always
LOGNAME=bheng
SSH_CONNECTION=10.20.100.88 49732 10.20.100.88 22
_=/usr/bin/printenv

当我打开php.info时,我看到了

enter image description here

  • 我到底有哪个PHP版本? 7或5?或两者?
  • 我们应该仅在Mac OS X上保留一个PHP版本吗?
  • 我们如何知道要保留哪一个?
  • 我们如何安全地删除不需要的那个?

有人,请澄清这种混乱。

0 个答案:

没有答案