Re: [RFC] Using objects as keys

From: Date: Mon, 27 Oct 2014 06:36:47 +0000
Subject: Re: [RFC] Using objects as keys
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-78370@lists.php.net to get a copy of this message
Hi! > It seems __toScalar might be a good name, this is what the method > actually does, the engine then coerces to a type suitable for use as a > key, but you can return a double. It might be more forward thinking > therefore to use the name __toScalar, while today we'd only be using > it for this, __toScalar does not express the fact why we are calling it - to use it as a key. It's not just a scalar conversion, it's conversion for the purpose of hashing.

« previous php.internals (#78370) next »