PHP 8.5 was released on 20 November 2025. For an existing Laravel application, the useful question is which changes help your code and whether the application and its dependencies are ready for the runtime upgrade.
Features to know
The release introduces a pipe operator for chaining calls, a URI extension for working with URLs, and a way to update properties while cloning an object. It also adds a NoDiscard attribute to flag ignored return values. These features are described with examples in the official PHP 8.5 release announcement.
Getting the first and last array values
PHP 8.5 provides array_first() and array_last(). They return values rather than keys; an empty array returns null. Read the array_first reference and array_last reference before replacing existing code.
For example, given an ordered list of workflow steps, the first value can be used as the initial step. Handle an empty list explicitly rather than assuming that a value will always exist. Keep older-runtime compatibility in mind when adopting the new helpers.
Review the application before changing production
Record the PHP version used by web requests, CLI commands, scheduled tasks and queue workers. On shared hosting these may be configured separately. Confirm the Laravel version and the extensions your application actually requires.
Check the PHP 8.5 migration guide against the code and dependencies you maintain. Make the upgrade on a separate branch with a staging environment running the target PHP version. Keep the current lockfile as the starting point so dependency changes remain reviewable.
Check Composer requirements
Run composer check-platform-reqs under the target PHP runtime to compare installed-package requirements with that environment. Use composer prohibits php 8.5 to investigate packages whose constraints block that version. Review the reported constraints before deciding whether a dependency needs an update.
A configured Composer platform version can help constrain dependency resolution, but it does not change the PHP binary running your application. See the Composer platform documentation and CLI reference for details.
Test the workflows people depend on
Run the project's existing automated suite on the target runtime. Then exercise login, permissions, forms, uploads, scheduled work, queues and external integrations in staging. Include invalid inputs and failed requests, not only successful submissions.
For an administration-heavy application, check the records and actions that staff use daily. A passing homepage request does not demonstrate that a background import or notification still works.
Compare performance and prepare the release
Measure representative pages and background jobs before and after the change under comparable conditions. Record response times, resource use and any new warnings. Avoid promising a speed increase based only on the PHP version number.
Plan how the previous runtime and application release can be restored if needed. Preserve new business records during any rollback. After deployment, verify the web and CLI runtimes and restart long-running workers through the application's normal release process.
Need help reviewing an upgrade?
I provide Laravel maintenance and performance reviews and hosting and deployment support. Share the current versions, hosting setup and the workflows that matter most so we can define a useful review.