I went back to full-time PHP development recently, and it wasn't too much of a surprise to see that recent macOS versions don't have it pre-installed. I was rather surprised instead when I realised that, as far as I know, there is no reliable PHP version manager like nvm
for NodeJS or rvm
/rbenv
for ruby.
So I decided to make one myself, sort of.
As stated in the README
file:
PHPTools is a Docker-based virtual environment that allows you to develop PHP applications on systems that don't have PHP installed
It allows to use the PHP interpreter and some tools like Composer and the PsySH shell through a Docker container like they were installed in your local machine.
With PHPTools you can quickly work on one-off PHP scripts and small projects without needing to spin up a full Docker-compose environment until you really can't do without it.
The current version supports PHP 8.1, and it's open source, free to use, and open to suggestions.
Download PHPTools from GitHub and start coding now, happy coding!