PHP in 2026: It's Not What You Remember
PHP's redemption arc is real — modern PHP 8.x has enums, fibers, readonly properties, and a world-class framework ecosystem. Here's the honest state of PHP today.
Every few months, someone posts "PHP is dead" on Twitter, and every few months, the usage statistics say otherwise. PHP powers roughly 77% of websites with a known server-side language. WordPress alone accounts for over 40% of the web. That number hasn't moved much in years, and it's not going down.
But here's the thing — the PHP you're probably thinking of isn't the PHP that exists today. If your mental model is PHP 5 with mysql_query() calls, spaghetti include chains, and $_GET parameters injected everywhere, you're about a decade behind. Modern PHP is a genuinely different language.
PHP 8.x — The Good Parts
PHP 8.0 through 8.4 shipped features that would've been unthinkable in the PHP 5 era. Let's go through the highlights.
Named arguments make function calls readable:htmlspecialchars(
string: $input,
encoding: 'UTF-8',
double_encode: false,
);
No more guessing what the third boolean parameter means.
Match expressions replace the clunkyswitch:
$status = match($code) {
200 => 'OK',
301 => 'Moved Permanently',
404 => 'Not Found',
500 => 'Internal Server Error',
default => 'Unknown',
};
match is an expression (returns a value), uses strict comparison, and throws an error if nothing matches. It's what switch should have been.
Enums — PHP finally got them in 8.1:
enum Status: string
{
case Active = 'active';
case Inactive = 'inactive';
case Pending = 'pending';
public function label(): string
{
return match($this) {
self::Active => 'Currently Active',
self::Inactive => 'Deactivated',
self::Pending => 'Awaiting Approval',
};
}
}
$status = Status::Active;
echo $status->label(); // "Currently Active"
Backed enums with methods. That's a real type system feature.
Readonly properties (8.1) and readonly classes (8.2):class User
{
public function __construct(
public readonly string $name,
public readonly string $email,
public readonly DateTime $createdAt,
) {}
}
$user = new User('Alice', 'alice@example.com', new DateTime());
$user->name = 'Bob'; // Error: Cannot modify readonly property
Constructor promotion combined with readonly gives you immutable value objects in a single, clean declaration.
Fibers (8.1) added cooperative multitasking to PHP. You won't use fibers directly most of the time, but they're the foundation for async libraries like ReactPHP and Amp. Laravel uses them under the hood for concurrent HTTP requests:$responses = Http::pool(fn (Pool $pool) => [
$pool->get('https://api.example.com/users'),
$pool->get('https://api.example.com/orders'),
$pool->get('https://api.example.com/products'),
]);
Three HTTP requests running concurrently. In PHP. That was science fiction five years ago.
Composer Changed Everything
Before Composer (PHP's package manager, circa 2012), PHP dependency management was copying files into folders. Composer brought PSR-4 autoloading, semantic versioning, and a central repository (Packagist) with over 400,000 packages.
composer require guzzlehttp/guzzle
composer require league/csv
composer require monolog/monolog
Modern PHP projects have proper dependency management, autoloading, and namespace organization. It's not different from npm or pip in practice.
Laravel — The Reason People Like PHP Now
If you asked a PHP developer in 2026 why they enjoy their work, the answer is almost certainly Laravel. It's a full-featured framework that handles routing, ORM (Eloquent), queues, caching, authentication, testing, and deployment. The developer experience is polished to an almost unreasonable degree.
// Define a route
Route::get('/users/{id}', function (int $id) {
$user = User::findOrFail($id);
return response()->json($user);
});
// Eloquent ORM query
$activeUsers = User::where('status', 'active')
->where('created_at', '>', now()->subMonth())
->orderBy('name')
->paginate(20);
// Queue a job
ProcessPodcast::dispatch($podcast)->onQueue('processing');
Laravel's ecosystem includes Forge (server management), Vapor (serverless deployment on AWS Lambda), Nova (admin panels), Livewire (reactive UIs without writing JavaScript), and Inertia (bridge to React/Vue frontends). It's a complete platform, not just a framework.
The documentation is also genuinely excellent. That matters more than people think.
Performance
PHP 7 was roughly twice as fast as PHP 5.6. PHP 8 with JIT compilation pushed it further. For web request/response workloads, PHP's performance is perfectly fine. It's not Go or Rust, but it doesn't need to be for most web applications.
The shared-nothing architecture (each request starts fresh) is actually a strength for web workloads. No memory leaks accumulating over time, no global state pollution between requests. The trade-off is that you can't hold things in memory between requests without external storage (Redis, Memcached), but for stateless web services, that's a non-issue.
When PHP Makes Sense
- Content-heavy websites — CMS platforms, blogs, e-commerce. WordPress, Drupal, Magento, Shopify (Liquid/Ruby now, but you get the idea).
- CRUD web applications — Laravel makes building standard web apps absurdly fast. Admin panels, dashboards, SaaS MVPs.
- Existing codebases — There's a massive amount of PHP code in production. Someone has to maintain and modernize it.
- Rapid prototyping — You can go from idea to deployed application faster in Laravel than in most other stacks.
- Shared hosting — PHP runs everywhere. Every cheap hosting provider supports it. That accessibility still matters for small businesses and personal projects.
When PHP Doesn't Make Sense
- Long-running processes — PHP's request-per-process model isn't ideal for WebSockets, real-time streaming, or persistent connections (though tools like Swoole and RoadRunner address this).
- CPU-intensive computation — Data processing, ML, scientific computing. Use Python, Rust, or Go instead.
- Microservices at scale — It works, but Go or Rust will give you better resource efficiency when you're running hundreds of containers.
- Systems programming — Obviously.
The Honest Take
PHP carries baggage. The early years of the language were rough — inconsistent function naming (strpos vs str_replace), weak typing by default, a history of security holes in popular applications. That reputation is earned. But the language has improved dramatically, and the ecosystem around it (particularly Laravel) is genuinely world-class.
If someone tells you PHP is dead, ask them what powers the website they're reading. There's a decent chance it's PHP.
If you're considering learning PHP or brushing up on modern PHP, CodeUp is a good starting point for practicing syntax and language features interactively. And if you already know PHP but haven't touched 8.x features, you owe it to yourself to catch up — it's almost a different language.