The pragmatic language the web runs on.
Fast, flexible and grounded. After 30 years PHP has never been more modern, typed, and pleasant to write.
Supported releases
Stay current, stay secure
Modern by default
Typed, expressive, and readable out of the box.
Readonly properties, named arguments, enums, and property hooks. The PHP you write today looks nothing like 2004 — and runs dramatically faster.
<?php
final class Money
{
public function __construct(
public readonly int $amount,
public readonly string $currency = 'USD',
) {}
// property hook — computed, read-only
public string $display {
get => number_format($this->amount / 100, 2)
. " {$this->currency}";
}
}
$price = new Money(amount: 4_999);
echo $price->display; // 49.99 USD
Built to be found
Documentation you can actually navigate.
The manual is PHP's superpower. We rebuilt search and organization around the way developers really look things up.
Instant search
Reference, organized
Real, copyable examples
Latest news
All announcementsUpdated PHP Windows builds for Brotli security fix
The PHP team announces updated Windows builds: PHP 8.5.12-1, 8.4.27-1, 8.3.36-1 and 8.2.35-1. These builds include Brotli 1.2.1, which fixes CVE-2026-...
Informational advisory: Session upload progress
We suggest you set session.upload_progress.enabled=0 until the next regular bugfix release, to fully protect from an unlikely RCE vector. This setting...
PHP 8.6.0 RC4 available for testing
The PHP team is pleased to announce the third release candidate of PHP 8.6.0, RC4. This continues the PHP 8.6 release cycle, whose rough outline is sp...
The PHP Foundation
PHP is built in the open, funded by people who depend on it.
The Foundation employs core developers to keep the language healthy for the next decade. Join the companies and individuals supporting the work.