# Download phpbrew
cd ~/.local/bin
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
# Install PHP build dependencies
sudo apt install libssl-dev libbz2-dev libcurl4-openssl-dev
# Workaround for php build not finding libcurl header files
cd /usr/local/include
sudo ln -s /usr/include/x86_64-linux-gnu/curl
# Init phpbrew
phpbrew init
cat<<EOT >> ~/.zshrc
function phpbrew() {
# "lazy-load" this because it's slow
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc
phpbrew "$@"
}
phpbrew install 5.4.45
phpbrew use 5.4.45