Issue getting mac to use brew php version

I had php installed and now I am trying to switch over to valet-plus to I can switch between php versions easy but I am running into some issues.

I have php71 and php 56 install but it seems like my computer keeps trying to use php from /usr/bin/local which is not where brew installs them.

When I do a php -v i get a warning "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20121212/' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/, 9): image not found in Unknown on line 0"

It is correct that file is not there. I installed mcrypt from brew with brew install php71-mcrypt. If I look at the php.ini file where brew installed it that will show that file in the different path.

This is my .bash_profile and I source it and no errors show up but still old php location is there.

# Prefer US English and use UTF-8
export LC_ALL="en_US.UTF-8"
export LANG="en_US"
export PATH="/usr/local/mysql/bin:$PATH"
#export PATH="/usr/local/php5/bin:$PATH"
export PATH="/usr/local/Cellar/php71/7.1.5_17/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

I looked at about 30 different topics similar but none of those helped me out. I have unlinked and relinked php, reinstalled from source. I just need some direction on what is causing my apache to use the php location it is using and not allowing brew to switch it over.