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

'get_class' differs from (zend)php when passing a first-class function #4803

Closed
dnp1 opened this issue Feb 9, 2015 · 4 comments
Closed

'get_class' differs from (zend)php when passing a first-class function #4803

dnp1 opened this issue Feb 9, 2015 · 4 comments

Comments

@dnp1
Copy link

dnp1 commented Feb 9, 2015

Lets the following php code:

$a = function () {return 0;};
echo get_class($a);

The zend's php outputs just "Clojure" while the hhvm ouputs "Closure$;0$10598a208dfd61cc68d5eda53b285607$"

Thanks!

@reeze
Copy link
Contributor

reeze commented Feb 9, 2015

I remember there is already an issue about this, but I can't find it.

@dnp1
Copy link
Author

dnp1 commented Feb 9, 2015

I'm sorry. I did a search and I couldn't find any correlated issue.

Should I close my issue?

@Majkl578
Copy link
Contributor

Majkl578 commented Feb 9, 2015

#3281, they call it a feature for some strange reason...

@dnp1 dnp1 closed this as completed Feb 9, 2015
@paulbiss
Copy link
Contributor

paulbiss commented Feb 9, 2015

@Majkl578, we use it to determine where closures were declared at runtime for error messages, backtraces, and logging. The hash can be parsed in a meaningful fashion and we consider it to be useful. You may disagree, about its utility, but I don't think it's a strange reason to want it.

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

No branches or pull requests

4 participants