zsh: command not found: php



PHP Snippet 1:

brew tap shivammathur/php

PHP Snippet 2:

brew install shivammathur/php/[email protected]

PHP Snippet 3:

brew link --overwrite --force [email protected]

PHP Snippet 4:

php -v

PHP Snippet 5:

 xcode-select --install

PHP Snippet 6:

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

PHP Snippet 7:

 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/**xxxxxxx**/.zprofile
 eval "$(/opt/homebrew/bin/brew shellenv)"

PHP Snippet 8:

 brew --version 

PHP Snippet 9:

 brew install php

PHP Snippet 10:

 php --version

PHP Snippet 11:

vim ~/.zshrc

PHP Snippet 12:

#export PATH="/usr/local/opt/[email protected]/bin:$PATH"
#export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
#export PATH="/usr/local/sbin:$PATH"

export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
export PATH="/usr/local/sbin:$PATH"

PHP Snippet 13:

nano ~/.bashrc 

PHP Snippet 14:

export PATH=$PATH:/usr/share/php/bin