Re: [RFC] Deprecations for PHP 8.6
| From: | Morgan | Date: | Wed, 24 Jun 2026 01:41:43 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.6 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131511@lists.php.net to get a copy of this message | ||
On 2026-06-24 11:58, Daniel Scherzer wrote:
I've added a few new entries, including the spl_object_hash() deprecation suggested by Morgan. -DanielOh, thank you for that; I was just about to write that up myself. Yup: pretty much every use I've seen of spl_object_hash (which I admit was only a small sample of lots of uses) is as an array key, where an integer would work just as well (and SplObjectStorage was a poor fit because it _wasn't an array_). For every other location I couldn't see what it achieved that a plain int couldn't and the places where its format as "32 hex digits" was relied on appeared to be because "that's the format spl_object_hash() outputs". The change from the more complex hash came in 8.1 without even a changelog entry. The only relevant discussion I could find was at https://github.com/php/php-src/pull/7010