Developed By Ken Key

Modern PHP in 2026: What Actually Changed and What Still Matters

By Ken Key Jan 18, 2025 4 min read Updated Oct 16, 2026

Modern PHP in 2026: What Actually Changed and What Still Matters
The short answer

PHP 8.4 and 8.5 are the current targets for 2026. The JIT speeds up CPU-bound work but barely helps typical CRUD apps waiting on MySQL and Redis. What matters most now: typed properties, readonly classes, and first-class callables. Get off 8.1, it's end of life.

Part of the complete web development guide.

On this page

Most of the PHP advice floating around the web is stuck somewhere around 2019. If you’re maintaining a real codebase in 2026, the language has moved on in ways that matter: typed properties, readonly classes, first-class callable syntax, and a JIT that finally does something useful for certain workloads. Here’s what’s actually worth your attention, and what’s still hype.

Where PHP Actually Stands in 2026

PHP 8.4 shipped in November 2024, and 8.5 landed in late 2025. The 7.x branch is long dead, and 8.1 hit end of life in December 2025, so if you’re still running it, you’re patching security holes yourself. The realistic support targets right now are 8.2, 8.3, 8.4, and 8.5.

The performance story is also more nuanced than the marketing suggests. The JIT that arrived in PHP 8.0 helps CPU-bound code (image processing, math-heavy loops, certain parsers) but does almost nothing for typical CRUD apps that spend their time waiting on MySQL and Redis. If someone tells you PHP 8.5 made their WordPress site 3x faster, they’re measuring something else.

Language Features Worth Using

Readonly Properties and Classes

Readonly properties arrived in 8.1, and readonly classes in 8.2. If you’re building value objects, this is the cleanest way to do it:

final readonly class Money
{
 public function __construct(
 public int $amountInCents,
 public string $currency,
 ) {}

 public function add(self $other): self
 {
 if ($this->currency !== $other->currency) {
 throw new InvalidArgumentException('Currency mismatch');
 }
 return new self($this->amountInCents + $other->amountInCents, $this->currency);
 }
}

No setters, no defensive copying, no accidental mutation. The engine enforces it.

Enums That Actually Do Work

Enums in PHP are real objects, not just constants. Backed enums with methods are the pattern I reach for constantly:

enum OrderStatus: string
{
 case Pending = 'pending';
 case Shipped = 'shipped';
 case Delivered = 'delivered';
 case Cancelled = 'cancelled';

 public function canTransitionTo(self $next): bool
 {
 return match($this) {
 self::Pending => in_array($next, [self::Shipped, self::Cancelled], true),
 self::Shipped => $next === self::Delivered,
 self::Delivered, self::Cancelled => false,
 };
 }
}

Compare that to a pile of string constants and a switch statement. It’s not close.

First-Class Callable Syntax

The foo(...) syntax from 8.1 replaces a lot of ugly Closure::fromCallable() and string-callable messes:

$lengths = array_map(strlen(...), $words);
usort($items, $comparator->compare(...));

Small thing, but it adds up over a codebase.

Property Hooks (8.4)

Property hooks let you attach get/set logic to a property without a separate getter method. If you’ve written Java-style getters in PHP for years, this is the replacement:

class User
{
 public string $email {
 set (string $value) {
 if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
 throw new InvalidArgumentException('Invalid email');
 }
 $this->email = strtolower($value);
 }
 }
}

You still get validation and normalization, but callers just do $user->email = 'X@Y.com'.

What I’d Actually Tell You to Skip

  • Chasing JIT for web apps. It’s off by default in production for a reason. Turn it on if you profile and find CPU-bound hot paths. Otherwise, leave it.
  • Rewriting working code to use every new feature. A 2016 codebase that passes tests and handles traffic doesn’t need readonly classes retrofitted into it.
  • Micro-optimizing with isset() vs array_key_exists(). Profile first. You’re almost always wrong about where the time goes.
  • Ignoring the deprecation warnings. 8.4 and 8.5 emit notices for things that will be errors in 9.0. Fix them while the fix is a one-line change.

Practical Upgrade Path for 2026

If you’re on 8.1 or older, the sequence that usually works:

  1. Run composer outdated and update dependencies on your current PHP version first. Get to a clean state.
  2. Run PHPStan or Psalm at your current level. Note the baseline.
  3. Bump to 8.3 (the safest current target). Fix deprecations and type errors. Deploy. Sit on it for a sprint.
  4. Then bump to 8.4 or 8.5 once 8.3 is boring.

Doing it in one jump is how you end up debugging a fatal error at 11pm. Doing it in stages is how you end up with a boring Tuesday.

Frameworks and Tooling

Laravel 12 is the current line (Laravel 11 dropped in 2024 with the slimmed-down skeleton, and 12 continued that direction). Symfony 7.x is the current major. Both require PHP 8.2 or higher, so the framework upgrade and the language upgrade are the same project whether you like it or not.

On tooling: Composer 2.x is standard, PHPUnit 11 is current, Pest is a popular alternative if you prefer a cleaner test syntax, and PHPStan/Psalm remain the two static analyzers worth setting up. If you haven’t added static analysis to a project before, start at level 0 and ratchet up one level per sprint. It’s the single highest-ROI change most PHP teams can make.

A Note on Where This Runs

A lot of the PHP I write runs on managed hosting or small VPS setups for clients around Long Island and NYC, and the deployment story matters as much as the language features. Opcache with opcache.validate_timestamps=0 in production, a proper deploy script that doesn’t leave half-written files, and PHP-FPM tuned to your actual memory ceiling. None of that is glamorous, but it’s the difference between a site that handles a traffic spike and one that falls over. If you’re weighing a rebuild versus an upgrade, the conversation usually starts with custom web development and ends with whatever keeps the maintenance cost low over the next three years.

FAQ

Is PHP still worth learning in 2026?

Yes, if you want to build web apps. It powers a huge share of the web, the job market is real, and modern PHP is a genuinely pleasant language. If your goal is mobile or data science, look elsewhere.

Should I upgrade to PHP 8.5 right now?

If you’re already on 8.3 or 8.4 and your dependencies support it, sure. If you’re on 8.1 or older, upgrade in stages (8.3 first) rather than jumping straight to the newest version. The deprecation fixes are the same work either way, just less risky in steps.

Does the JIT make PHP as fast as Go or Node?

No. For typical web request workloads, PHP 8.x is competitive with both, but the JIT doesn’t change that picture much. Where PHP wins is the request lifecycle and the ecosystem, not raw CPU throughput.

Have a project like this?

I do custom web development for Long Island businesses. If you need this done right, let’s talk.