Skip to content
Custom software

PHP 8.5 for business software developers: the pipe operator, URIs and the features we actually use

Released on 20 November 2025, PHP 8.5 makes business software code more readable and more secure. Here are the new features we bring into our projects, with concrete examples.

Team Cloudita

2 min read

Illustrazione: PHP 8.5 per chi sviluppa gestionali: pipe operator, URI e le novità che usiamo davvero

Most of the management software we build, from the beach umbrella map to restaurant ordering, is written in PHP with a MySQL database. Not out of habit: it is a mature, fast language that can be hosted anywhere, with a huge ecosystem. Version 8.5, released on 20 November 2025, adds tools that make the code cleaner.

The pipe operator |>

It is the most visible new feature. It lets you pass a value through a series of functions, from left to right, instead of nesting them inside each other.

Before:

$slug = strtolower( trim( str_replace( ' ', '-', $name ) ) );

With PHP 8.5:

$slug = $name
    |> fn( $s ) => str_replace( ' ', '-', $s )
    |> trim(...)
    |> strtolower(...);

Chained transformations are everywhere in business software: cleaning a product code, normalizing a phone number, computing a price with discounts and VAT. Reading them in the order they happen reduces mistakes.

A URI extension that follows the standards

PHP 8.5 introduces an extension to read and modify web addresses according to RFC 3986 and the WHATWG URL standard. It sounds like a detail, but parse_url() had ambiguous behaviors that caused vulnerabilities in the past (for example in redirect and webhook checks). For anyone integrating payments, notifications and external APIs it is a step forward for security.

Other useful additions

  • Clone with: clone an object while changing some properties in a single statement, handy with immutable objects (an order, a booking);
  • #[\NoDiscard]: warns if a function’s return value is ignored, useful for functions like “save” or “verify” whose result must never be lost;
  • array_first() and array_last(): finally, no more tricks with reset() and end();
  • stack traces on fatal errors: when something breaks in production, you immediately see where;
  • persistent cURL handles shared across requests: less time wasted when the software talks to external services.

When to upgrade

For new projects we start straight from recent versions. For existing ones the upgrade is planned: we run the tests, check the libraries and upgrade a staging environment first. Staying on unsupported PHP versions, on the other hand, is not an option: it means no more security fixes.

Want to know which version your software or website runs on? Ask us: it is the first thing we check.

Sources

  1. PHP.Watch: PHP 8.5, what's new and changed
  2. The Register: PHP 8.5 adds pipe operator and new URI tools

Let's talk

Got a website, a software project or a security question? A real person will get back to you.

Write to us

Keep reading

All articles

Music: "Tech Corporate Startup Promo With Bright Drive" by Alex Morgan, CC BY 4.0 licence. Satellite imagery Esri, Maxar.