🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

PHP 8.5 Feature Freeze: Pipe Operator, Pattern Matching Preview, and Performance Gains

PHP 8.5 Feature Freeze: Pipe Operator, Pattern Matching Preview, and Performance Gains

The PHP development team has announced the feature freeze for PHP 8.5, scheduled for release in November 2026.

Pipe Operator

The long-awaited pipe operator (|>) allows functional-style chaining of function calls:

$result = $input
    |> trim(...)
    |> strtolower(...)
    |> str_replace(' ', '-', ...)
    |> htmlspecialchars(...);

This improves readability for data transformation pipelines without deeply nested function calls.

Pattern Matching (Preview)

An early preview of pattern matching is available behind a feature flag. It introduces match-like syntax with destructuring:

match($response) {
    Status::Ok($data) => handleSuccess($data),
    Status::Error($code, $msg) => handleError($code, $msg),
}

Other Improvements

  • Readonly Class Improvements — Readonly classes can now implement interfaces with mutable contracts
  • Closure::bind() Improvements — Better closure composition utilities
  • Locale-Independent Float Parsing — Consistent float-to-string and string-to-float behavior
  • JIT Improvements — 10-15% performance gain over PHP 8.4 in real-world applications
Share this article:
Dargslan Editorial Team (Dargslan)
About the Author

Dargslan Editorial Team (Dargslan)

Collective of Software Developers, System Administrators, DevOps Engineers, and IT Authors

Dargslan is an independent technology publishing collective formed by experienced software developers, system administrators, and IT specialists.

The Dargslan editorial team works collaboratively to create practical, hands-on technology books focused on real-world use cases. Each publication is developed, reviewed, and...

Programming Languages Linux Administration Web Development Cybersecurity Networking

Stay Updated

Subscribe to our newsletter for the latest tutorials, tips, and exclusive offers.