Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hash, className & id methods for Php::Value #120

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add hash, className & id methods for Php::Value #120

wants to merge 3 commits into from

Conversation

andot
Copy link
Contributor

@andot andot commented Jul 10, 2014

If you want to use Php::Value as a key of unordered_map, you can use hash method to implement the hash function. But it only works correctly when patched #114.

className method can return the calss name of the object. and return empty string when the value is not an object.

id method return an id of the object. It is like spl_object_hash, it return empty string when the value is not an object.

andot added 3 commits July 10, 2014 22:25
If you want to use Php::Value as a key of unordered_map, you can use
this method to implement the hash function. But it only works correctly
when patched #114.
This method can return the calss name of the object. and return empty
string when the value is not an object.
This method return an id of the object. It is like spl_object_hash, it
return empty string when the value is not an object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant