The web runs
on PHP.

Build websites, APIs, and applications with a modern, open source language, mature tools, and a global community. It's a scripting language too, just as strong on the command line as on the web.

Everything the web needs.

Security. AI & agents. APIs & JSON. Databases. Scalability. Performance. PHP connects the pieces of the modern web.

Made for the web.
From the beginning.

PHP has grown with the web. From dynamic pages and forms to data pipelines and AI agents, the language and its ecosystem grow with your application.

We’ve come a long way from a personal home page.

examples

UserController.php

Attributes, typed properties, and constructor injection; a whole JSON endpoint in one class.

<?php
// Map a web request to a JSON response.

class UserController
{
    public function __construct(
        private readonly UserRepository $users,
    ) {}

    #[Route('/users/{id}', methods: ['GET'])]
    public function show(int $id): Response
    {
        $user = $this->users->find($id)
            ?? throw new NotFoundException();

        return Response::json([
            'id' => $user->id,
            'name' => $user->name,
        ]);
    }
}

Terminal

Example session

curl localhost:8000/users/42
{"id":42,"name":"Ada Lovelace"}

A package for
almost everything.

A little less reinventing the wheel.

480 thousand

packages published

6.06 million

versions

more than 213 billion

installs

Composer + Packagist

Declare what your project needs, lock exact versions, and install the same dependency graph everywhere. Search Packagist to find packages for databases, APIs, testing, queues, files, and almost everything between.

composer require vendor/package

Still moving.
Always improving.

More to build with.

8.6

Released November 19, 2026

Meet PHP 8.6.

Partial Function Application
Fill in some of a function’s arguments now with ? and ... placeholders, and get back a Closure that takes the rest.
Duration Class
The new Time\Duration class expresses timeouts and benchmark timings with nanosecond precision, independent of any clock or timezone.
Polling API
Io\Poll watches many streams at once using epoll, kqueue, and other native mechanisms, without the limits of stream_select().

Built by people.
Open by design.

PHP has been community-owned for 31 years. The language evolves through public proposals, discussion, and votes, and is free from corporate control.

Contribute to the language, improve the docs, or help someone find their feet. There’s a place for you here.

Funding the people behind PHP.

Your support funds work on PHP’s core, helping maintain and improve the language that so much of the web depends on.

Get started.

Get PHP running, find your feet in the language, and explore a world of packages ready to help.

Get started with PHP
  1. Get set up.

    Install PHP locally or configure it for your servers. Find the setup that fits your tools and infrastructure.

  2. Learn the language.

    Dive into the documentation or follow a guided tutorial. Explore the features, functions, and patterns you’ll use.

  3. Explore the package ecosystem.

    Find reusable packages and native extensions for the work your application needs to do.

PHP through the years.

Three decades of releases. Drag, scroll, or use your arrow keys to explore. Open any version for its notes, or read the story.

Drag or scroll horizontally to explore releases. Follow a version to read its release details. Use the arrow keys to move between releases, or Home and End to jump to the first and last. Taller marks indicate major versions. PHP 6 was never released.

  1. 1.0
  2. 2.0
  3. 3.0
  4. 4.0
  5. 4.1
  6. 4.2
  7. 4.3
  8. 5.0
  9. 4.4
  10. 5.1
  11. 5.2
  12. 5.3
  13. 5.4
  14. 5.5
  15. 5.6
  16. 7.0
  17. 7.1
  18. 7.2
  19. 7.3
  20. 7.4
  21. 8.0
  22. 8.1
  23. 8.2
  24. 8.3
  25. 8.4
  26. 8.5
  27. 8.6