Re: Exposing object handles to userland

From: Date: Mon, 03 Aug 2015 17:56:35 +0000
Subject: Re: Exposing object handles to userland
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-87583@lists.php.net to get a copy of this message
Hi! > Ehm, you realize that object id is only reset because the old object is freed? As long as the > target object is referenced, nothing will have the same object id. Yes, but if you use it as some sort of ID - e.g. as in "did I already create a object of class X with parameters stated in class Y" and use class Y's object ID as a key for that, you're in for a nasty surprise if some other code deletes that object and creates new object of class Y with the same ID but completely different content. That's what one of the code examples referred to in this thread was doing, if I understood it correctly. Which only goes to emphasize my point - a lot of the people that want object IDs are either using them wrong or plan to use them wrong. And wrapping more rope around their necks is not exactly what we should be doing. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#87583) next »