Closed
Description
With pull request php/php-src#7010 (PHP 8.1, I think) the result format of spl_object_hash() changed.
The hash is now much more simple and can be something like 0000000000000e600000000000000000
, which PHP will interpret as number 0
(exponent).
We stumbled across this, because we used the object hash to check, if we already processed an object. We stored the hash in an array and checked with a simple in_array()
, if array contains hash. But with PHP 8.2 this suddenly returned true for some objects which lead to some "interesting" side effects...
So I think it would be worthwhile to add a notice in documentation, that the hash should always be compared type-safe.