動作確認はMacにphpをインストールしてローカルで行っています。 しかし、本番環境のphpバージョンと同じバージョンで動かしたいこともあるので、複数のphpバージョンを切り替えたいときがあります。 Homebrewを使う、phpのバージョン切り替え方法です。 コマンドラインで動作するphpとWebサーバー(Apache)で動作するphpのバージョンを変更します。 まずは複数バージョンのphpをインストール 違うバージョンのphpをインストールする前に、今動いているバージョンのphpをunlinkします。 ※下記の記述は古いバージョンです。 brew install php56 php56-apcu php56-imagick php56-intl php56-mcrypt php56-opcache php56-xdebug --with-httpd24 --with-libmysql