I'm on a Mac (OS Sierra, 10.12.6). If I run php -v
, then it tells me, that I'm running version 5.6.30. And if I run which php
then it gives me this path: /usr/bin/php
.
I would like to run PHP7.1, - and I would like to install it using Homebrew. But before I do so, I thought it would be wise, to ensure that all old stuff, that can be removed - is removed.
I'm not running a local server or anything. But I still took a look inside this file: /private/etc/apache2/httpd.conf
, - then I can see that this line is commented out:
#LoadModule php5_module libexec/apache2/libphp5.so
And I can't imagine what other programs would have PHP5 as a dependency.
I know that I can run PHP5 and PHP7 in parallel. And the answer from this post stated, that as long as your /usr/local/bin/
came before /usr/bin
in my `$PATH$, then the Homebrew-PHP would be used. But it just seems a bit hacky, - to just 'put PHP7 in front of PHP5' and disregard any potential collision further down the line.
So to sum up... Can I delete my PHP5-installation? Or is it like with Python-versions, that there's a native version (2.7.x) that shouldn't be tinkered with, - and then you can install your own version somewhere else?
And if I can simply remove PHP5, - then how do I do it (I can't find that anywhere)? I haven't installed PHP5 myself, - and it's not installed with Brew. I have PhpStorm installed, - so it may have come with that.