thephpleague/oauth2-server — pull request #290 by sarciszewski (2015-01-01 06:34:29+00:00)
Title: Remove side-effects in hash_equals()

This is functionally identical, but without the side-effect of defining a function in the current namespace.

Also, it uses absolute function reference (`\hash_equals` instead of `hash_equals`) because if someone defined `League\OAuth2\Server\TokenType\hash_equals()` elsewhere, it would try that first.

Kudos for using `hash_equals()` in your original design for this feature. Many OAuth2 implementations neglect this nuance :)