PHP 8.5 is now live across the Switchweb platform

PHP 8.5 is now live across the Switchweb platform

PHP 8.5 has been fully rolled out on all Switchweb hosting environments, bringing you faster performance, cleaner syntax, and a host of developer‑friendly upgrades.

You can update your hosting package’s PHP version at any time through the PHP Version Manager in your Switchweb control panel.

WordPress compatibility

At the time of release, WordPress has beta support for PHP 8.5. WordPress marks versions as “beta‑supported” until at least 10% of WordPress sites are using that PHP release or newer.

What’s new in PHP 8.5

PHP 8.5 is a milestone upgrade that makes your codebase faster, safer, and more expressive. Here are some standout features:

1. Pipe operator (|>)

The new pipe operator lets you chain functions in a logical, left‑to‑right flow – making code cleaner and easier to read. It simplifies transformation pipelines without temporary variables, which is a big win for readability.

2. Built‑in URI extension

A brand‑new URI extension is now part of the PHP core, providing RFC 3986 and WHATWG‑compliant URL parsing and manipulation without relying on external libraries. This means more reliable, consistent handling for URLs and redirect logic.

3. Enhanced cloning for immutables

The updated clone() functionality allows you to override properties during cloning – perfect for immutable objects and readonly classes. Frameworks and APIs can now adopt simpler, boilerplate‑free “with‑er” methods for managing object states.

4. More utility functions

Everyday coding just got smoother with several new helper functions:

  • array_first() and array_last() for quick access to endpoints in arrays.

  • get_error_handler() and get_exception_handler() to retrieve current handlers.

  • locale_is_right_to_left() for detecting right‑to‑left language contexts.

  • A new constant PHP_BUILD_DATE to check the PHP binary’s build timestamp.

  • Command line addition: php --ini=diff to show only configuration changes from defaults.

5. Attribute and constant expression updates

Developers can now use closures and first‑class callables in constant expressions, and even attach attributes to constants. The new #[\NoDiscard] attribute helps ensure return values are handled or explicitly ignored – improving code reliability.

6. Deprecations and removals

As with any major version, PHP 8.5 includes several clean‑ups:

  • Deprecated: non‑canonical scalar type casts (boolean, double, integer, binary).

  • Deprecated: curl_close, curl_share_close, xml_parser_free, and socket_set_timeout.

  • Removed: CLI/CGI options -z and --zend-extension.

Before upgrading, review your codebase and dependencies to ensure they don’t use deprecated features.

Upgrade recommendations

To make the most of PHP 8.5 and ensure a smooth transition:

  1. Audit your code and dependencies for deprecated features.

  2. Test applications in a staging environment first.

  3. Confirm compatibility of custom or third‑party PHP extensions.

  4. Update deployment pipelines to include new PHP constants and diagnostics.

  5. Let your team and clients know PHP 8.5 is supported – and highlight its performance, readability, and long‑term support advantages.

Final thoughts

This release cements PHP 8.5 as one of the most developer‑focused updates yet – improving readability with the new pipe operator, adding functional‑style patterns, and modernising the ecosystem with better tools for immutability, URL handling, and debugging.

Switchweb customers can now take full advantage of all these enhancements right from their hosting dashboard.


Looking to get started on Switchweb? Take a look at our website hosting plans or message us about a free trial.


Pete White

Pete White has worked in the UK web hosting industry for over 20 years, supporting businesses, charities, grassroots campaigns, and non-profit organizations to launch their digital presence with secure, high-performance hosting.

Post Your Comment

SWITCHWEB 7 DAY FREE TRIAL

— No Credit Card Required—

7 Day Free Trial
Not ready to commit just yet? That is completely fine. We are confident that once you try Switchweb, you will not want to leave.