Hi! > I'd prefer to add a separate function spl_object_id, which directly returns > the handle. This should supersede spl_object_hash in the long run.
Since in PHP 7 there's no longer a possibility of having different object stores, as far as I can see, spl_object_id can identify an object (it wasn't possible before 7). However, committing to having specific object ID (e.g. as integer) as part of public API is pretty big commitment which I personally think creates unnecessary coupling between PHP internals and user code and is a bad design decision which may bite us later. > spl_object_hash does a bunch of pointless things that serve no purpose > other than making the function slower and making the result more bulky. Before PHP 7, it created proper object identification, as objects could be stored in different stores. As PHP 7 removed that possibility, indeed adding Z_OBJ_HT_P is no longer serving any purpose. Performance though has very little to do with it - it's just two XORs and one printf. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php