Re: Exposing object handles to userland

From: Date: Sun, 02 Aug 2015 06:52:21 +0000
Subject: Re: Exposing object handles to userland
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-87491@lists.php.net to get a copy of this message
Hi! Some suspicious use of spl_object_hash() out there... > > https://github.com/symfony/symfony/blob/master/src/Symfony/Component/VarDumper/Cloner/VarCloner.php Not sure what this one does... but calculations with spl_object_hash() look very suspicious. > > https://github.com/horde/horde/blob/master/imp/lib/Factory/MimeViewer.php¼=Q|â > 3Hûix½`­+ > This one _might_ be doing it right, but not sure as basing caching instances on hash of a (mutable) object may produce weird results. > qTøÖ’3ß > –ºÈ.ú£œhttps://github.com/horde/horde/blob/master/framework/Support/lib/Horde/Support/Randomid.php Oh wow, what's going on there? That's obviously not a proper use of spl_object_hash(). > > > https://github.com/WordPress/WordPress/blob/master/wp-includes/plugin.php I guess this one is wrong too, as it mentions storage, and storing object ID is pointless. Maybe I am misunderstanding what "storage" means there. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#87491) next »