Re: Add \Reflection*::getHash()
| From: | Andreas Hennings | Date: | Mon, 11 Dec 2017 03:07:18 +0000 |
| Subject: | Re: Add \Reflection*::getHash() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101303@lists.php.net to get a copy of this message | ||
On 11 December 2017 at 04:03, Andreas Hennings <andreas@dqxtech.net> wrote:
> So far this proposal only discusses reflections of PHP declarations / symbols.
>
> What would we do for e.g. ReflectionObject?
> Return the spl_object_hash()?
> Or return the hash of the instantiated class?
> Or a hash of the serialized object?
> We need to return something, because ReflectionObject extends ReflectionClass.
If the method is instead named ::getDeclarationHash(), it will be
clear that ReflectionObject->getDeclarationHash() will be the same as
for the instantiated class.