Setting up modern PHP in 2026
Install PHP 8.5, Composer, and a dev server you'll actually enjoy using.
Table of Contents
PHP in 2026 is a different language from the one old tutorials warned you about. Types are strict, the tooling is fast, and setting it up takes ten minutes.
Install the runtime
Use your operating system’s package manager, or a version manager if you plan to juggle projects:
php -v
# PHP 8.5.x
Add Composer
Composer is the dependency manager you’ll use in every project:
composer --version
composer create-project php/html my-site
Run the dev server
PHP ships with a perfectly fine local server for development:
php -S localhost:8000 -t public
Open http://localhost:8000 and you’re running modern PHP. In the next part we tour the syntax you’ll use every day.