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.

-Daniel

Oh, 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

Reply via email to