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

回调是如何传递外部参数的? #72

Closed
fanchou opened this issue Aug 5, 2015 · 2 comments
Closed

回调是如何传递外部参数的? #72

fanchou opened this issue Aug 5, 2015 · 2 comments

Comments

@fanchou
Copy link

fanchou commented Aug 5, 2015

回调是如何传递外部参数的?

@overtrue
Copy link
Collaborator

overtrue commented Aug 5, 2015

$foo = 'foo';
$bar = 'bar';

function() use($foo, $bar){
    echo $foo, $bar;// foo bar
}

http://php.net/manual/zh/functions.anonymous.php

@overtrue overtrue closed this as completed Aug 5, 2015
@fanchou
Copy link
Author

fanchou commented Aug 5, 2015

谢谢!很好使

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

2 participants