Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PHP Closures - Lightning Talk
Search
Jeremy Lindblom
September 12, 2013
Programming
2
170
PHP Closures - Lightning Talk
Lightning talk about Closures given on September 12th, 2013, to the Seattle PHP User Group.
Jeremy Lindblom
September 12, 2013
Tweet
Share
More Decks by Jeremy Lindblom
See All by Jeremy Lindblom
Diagram Like a Principal Engineer
jeremeamia
1
130
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.8k
What's New in PHP 7.4?
jeremeamia
0
120
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
170
Protecting Your Code From A Mischievous Future
jeremeamia
1
250
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
310
Uploading to S3 from PHP
jeremeamia
0
120
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.3k
aRESTful Development with the Wordpress API
jeremeamia
0
180
Other Decks in Programming
See All in Programming
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
280
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.5k
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
40
16k
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
180
CI改善もDatadogとともに
taumu
0
180
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
140
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Conform を推す - Advocating for Conform
mizoguchicoji
3
700
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
7
4.1k
Writing documentation can be fun with plugin system
okuramasafumi
0
120
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
850
Unity Android XR入門
sakutama_11
0
170
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A Tale of Four Properties
chriscoyier
158
23k
A better future with KSS
kneath
238
17k
Automating Front-end Workflow
addyosmani
1368
200k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Statistics for Hackers
jakevdp
797
220k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
Transcript
Closures! A lightning talk by Jeremy Lindblom! <?
What are Closures?! Closure anatomy! Closures in objects! Objects as
Closures!
A Closure is an object! that represents an! anonymous function.!
They're anonymous because they don't have a name.!
They are also called lambdas, or lambda functions.! ! This
is a reference to a branch of mathematics called lambda calculus.! Let's not even go there.!
Named functions have names so they can be referenced and
reused.! ! Anonymous functions don't need to be reused. They're great for callbacks...!
like when you are sorting…!
or mapping…!
or anything, really.!
Anatomy of a closure/lambda!
Basic closure syntax!
The use clause!
Recursive closures!
Closures in objects!
Closures in objects!
Binding!
Binding! Scope! Access!
Objects as Closures!
__invoke()!
Closures! QUESTIONS?> <?