On Mon, Aug 3, 2015 at 2:26 PM Alexander Lisachenko <lisachenko...@gmail.com> wrote:
> Hello, internals! > > I like the idea to assign a custom identifier to the object, but why this > should be only in the core? Java has a method 'hashCode' which can be used > to return an unique identifier for specific object. Java's hashcode is not unique,it is not meant to be: two live objects can have the same hash. Having a hashCode method that returns 0 for all objects is a valid (albeit stupid) implementation. As for PHP, It seems like what people actually want is a unique identifier for objects (for the lifetime of the request), but they compromise and use the handle instead as it is available without userland counter. Best,