Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Waldemar's avatar

Valet PHP

Hello! I have a problem with php. When i install php 7

php -v

PHP is correct after install version 7 but when i reboot Mac PHP still is old PHP 5.5.36 What i do is wrong?

0 likes
4 replies
Waldemar's avatar

@tykus YES

➜  ~ brew install php70
Warning: homebrew/php/php70-7.0.15_8 already installed
tykus's avatar

Homebrew will have installed PHP in /usr/local/bin, do you have this in you $PATH? The order of paths is important - it should be before the path to system php

ejdelmonico's avatar

As @tykus stated as well as it must also be before /use/local/sbin for it to work. Just type in terminal which php to see if the version you are using is coming from /use/local/bin. If it is, then you should be using what you installed via HomeBrew. Also, make sure homebrew linked that version of php. brew link php70. My guess is the linking is the problem or you don't have /usr/local/bin in front of all the other bin paths. It must come before the others.

Please or to participate in this conversation.