Skip to content

Instantly share code, notes, and snippets.

@rambolee
Created October 25, 2016 11:20
Show Gist options
  • Save rambolee/029efc7be99af7debf5f8b5faf44c672 to your computer and use it in GitHub Desktop.
Save rambolee/029efc7be99af7debf5f8b5faf44c672 to your computer and use it in GitHub Desktop.
看 Laravel 代码中 PHP 闭包

先记录一下Search 到的比较好的一些文章:

Laravel 5.1 或者更高版本中,都是基于PHP 5.5 或者以上版本的。也采用了很多新的 PHP 高版本语言的特性。读到代码的时候经常遇到匿名函数或者闭包的使用。感觉不是很熟悉,所以,检索了一定的资料便于阅读。

下面记录一个例子,也是读到 QuickStart 代码中的片段如下: quick_start_router_closeure 其中 Route::group(); 中第二个参数就是使用匿名函数的形式进行处理的。

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