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

Type confusion: callback or callable #1645

Open
scato opened this issue Sep 7, 2015 · 2 comments
Open

Type confusion: callback or callable #1645

scato opened this issue Sep 7, 2015 · 2 comments

Comments

@scato
Copy link

scato commented Sep 7, 2015

The ABNF on http://phpdoc.org/docs/latest/references/phpdoc/types.html contains "callback" as a keyword, but not "callable". The list of keywords below contains "callable", not "callback".

http://php.net/manual/en/language.pseudo-types.php says those two are the same, a bit perhaps like "bool" and "boolean"?

I'd be happy to create a pull request for updating the reference documentation, but I have no idea where to find it. :)

@mvriel
Copy link
Member

mvriel commented Dec 2, 2015

Hello @scato,

IIRC the official keyword is callable as that is also used to create type hints with. A PR is greatly appreciated!

@AnrDaemon
Copy link

callback is an old documentation wording that predates the callable type hint and \Closure class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants