brew链接新的php版本错误

brew link php70 is giving me the following error:

Warning: php@7.0 is keg-only and must be linked with --force
Note that doing so can interfere with building software.
If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/php@7.0/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/php@7.0/sbin:$PATH"' >> ~/.bash_profile

but in ~/.bash_profiles:

PATH=$PATH:/usr/local/opt/php@7.0/bin
export PATH

please tell me how I can solve it.

thanks.

Add next lines to your ~/.bash_profile file:

export PATH="/usr/local/opt/php@7.0/bin:$PATH"
export PATH="/usr/local/opt/php@7.0/sbin:$PATH"

Or try adding the next lines in ~/.bashrc file

export PATH="/usr/local/opt/php@7.0/bin:$PATH"
export PATH="/usr/local/opt/php@7.0/sbin:$PATH"