Re: Exposing object handles to userland
| From: | Rowan Collins | Date: | Sun, 02 Aug 2015 18:03:53 +0000 |
| Subject: | Re: Exposing object handles to userland | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87525@lists.php.net to get a copy of this message | ||
On 02/08/2015 18:41, Bob Weinand wrote:
The right thing for what purpose? Why does it need that ID, rather than the value that spl_object_hash() gave in the first place? Just to be prettier to the user? Regards, -- Rowan Collins [IMSoP]Some suspicious use of spl_object_hash() out there...Not sure what this one does... but calculations with spl_object_hash() look very suspicious. Actually, it's doing the right thing… calculating the value the object id is xor'ed with (as we know that consecutively defined objects have consecutive ids). It's relying on the implementation of spl_object_hash() and will even continue to work when we remove that part of randomness as that value it's xor'ed with is then nothing else than 0.https://github.com/symfony/symfony/blob/master/src/Symfony/Component/VarDumper/Cloner/VarCloner.php