Everything on PHP 8.5.
12 articles tagged PHP 8.5, sorted newest first.
Reuse the TLS Handshake: PHP 8.5 Persistent cURL Share Handles in Laravel
Every outbound HTTPS call from a PHP request starts from nothing — resolve, connect, handshake, then finally send. PHP 8.5 lets a worker keep that setup between requests, and Laravel 13 exposes it in one line.
Who Owns the Error Handler? PHP 8.5's get_error_handler() and get_exception_handler()
PHP 8.5 finally lets you read the current error and exception handler without setting one first. Here is how to use it to find whatever is swallowing your exceptions.
The Widget That Forgets: Partitioned Cookies in PHP 8.5 and Laravel 13
PHP 8.5 finally lets setcookie() emit the Partitioned attribute. Here is how to use it, how Laravel 13 exposes it, and who should leave it alone.
PHP 8.5 Attributes on Constants: A Real Deprecation Path at Last
PHP 8.5 finally lets attributes target global constants, so #[\Deprecated] works on them — and on traits. Here is what actually changed, and what will break if you ship it too early.
Debug Faster with PHP 8.5 Fatal Error Backtraces
Before 8.5, a fatal timeout or out-of-memory error gave you one line and no path. PHP 8.5 prints the full stack trace by default — here's how it works.
PHP 8.5 #[\NoDiscard]: Stop Silently Ignoring Return Values That Matter
PHP 8.5 ships a new #[\NoDiscard] attribute that warns when you forget to use a function's return value. Here is how to apply it to your own immutable builders — and why (void) is the only safe way to suppress it.
PHP 8.5 Asymmetric Visibility for Static Properties
PHP 8.5 finishes what 8.4 started: asymmetric visibility now applies to static properties. Read freely, write only from inside: and ditch the static getter boilerplate for good.
PHP 8.5 Deprecations Cheat Sheet: What to Fix Before Upgrading
PHP 8.5 ships with a batch of deprecations that will become hard errors in PHP 9.0. Here's the complete list with one-line fixes and a Rector command to automate the scan.
PHP 8.5 array_first and array_last: Clean Up Your Collection Fallbacks
PHP 8.5 adds two long-overdue functions that eliminate the awkward workarounds for accessing the first or last element of an array.
Stop Using parse_url(): PHP 8.5's URI Extension Explained
PHP 8.5 ships a built-in URI extension that replaces parse_url() with immutable, type-safe objects. No third-party package needed.
PHP 8.5 clone with: Updating Readonly Objects Without Boilerplate
PHP 8.5 lets you pass an array to clone() to update properties in one expression. Here's how it replaces wither method boilerplate: and the gotchas you need to know first.
PHP 8.5 Pipe Operator: Clean Function Chaining in One Line
PHP 8.5's |> operator lets you chain functions left-to-right instead of nesting them inside-out. Here's how it works and where it breaks down.