-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Typehint callable not supported #582
Comments
HipHop does not currently support all PHP 5.4 features. We plan to add support for the "callable" typehint some time in the coming months. |
It's there now: cc37fe6 |
This is still failing for me: <?php
function callMe(callable $b) {
$b();
}
callMe(function() {
echo "hello\n";
}); Throws:
Version:
|
@paroski, this seems to work only when EnableHipHopSyntax=1. Any idea why? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PHP 5.4 introduces the callable typehint to allow closures, string $function and array($obj, 'method'). See http://php.net/manual/de/language.types.callable.php for details. HipHop analyzes callable as UnknownClass.
The text was updated successfully, but these errors were encountered: