The absolute fastest way to install PHP on your system in 2025
About only 2-3 years ago, if you wanted to install PHP on your system, you had to go through a long and tedious process of downloading the source code, compiling it, and then installing it.
Sure, there are package managers like apt, brew, and choco that made it easier, but they are still slow and not time-consuming in my opinion. For instance, if you wanted to install PHP 8.2 on your system, you had to wait for the package manager to update its repositories and install it. Also, if you wanted to install a specific version of PHP, you had to go through the same process again.
And then if you’re working with modern PHP, you gotta have Composer installed too. So, you had to go through the same process of installing it as well.
Well, not anymore!
We now have php.new. It’s a new way to install PHP on different platforms (Windows, macOS, and Linux). It is super fast and makes this process a breeze. It uses the latest versions of PHP and Composer and installs them in a matter of seconds.
All you need is you land on the page, select your operating system and it gives a Bash command that you need to run in your terminal. And just like that, you’ll have the latest version of PHP and Composer installed on your system. On top of this, it also drops a Laravel installer to quickly get started with Laravel development.
Under the hood, it runs a Bash script that uses Herd Lite by Beyond Code to install PHP, Composer, and Laravel installer.
👋 Hi there! I'm Amit. I write articles about all things web development. If you enjoy my work (the articles, the open-source projects, my general demeanour... anything really), consider leaving a tip & supporting the site. Your support is incredibly appreciated!