38
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacをPHP7へバージョンアップする

Posted at

はじめに

なんとなく、MacのPHPをPHP7へとバージョンアップしたくなったのでしてみることにしました。

ちなみに、僕のMacはこんな感じ。

  • OS X Yosemite 10.10.5
  • PHP5.5.10

brewでいってみよう

ということで、下記コマンドを打っていけばイケます!

updateはどうでもいいかもです(`・ω・´)ゞ

$ brew update
$ brew install homebrew/php/php70
$ vim ~/.bashrc

で、PATH通してくれ、と言われるはずなので。

.bashrc
  export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"

そして、よしなにしてあげれば。

$ source ~/.bashrc
$ php -v

PHP 7.0.7
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

終わりに

エラー出るかなと思ったけど何もなかった。
おめでとう。

38
32
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
38
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?