Articles php-8.5
TAG ARCHIVE

Everything on php-8.5.

7 articles tagged php-8.5, sorted newest first.

php

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.

7 min read
php

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.

7 min read
php

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.

5 min read
php

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.

5 min read
php

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.

6 min read
php

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.

4 min read
php

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.

4 min read