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
180
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
250
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.9k
What's New in PHP 7.4?
jeremeamia
0
200
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
230
Protecting Your Code From A Mischievous Future
jeremeamia
1
360
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
420
Uploading to S3 from PHP
jeremeamia
0
210
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.4k
aRESTful Development with the Wordpress API
jeremeamia
0
250
Other Decks in Programming
See All in Programming
Cursorハンズオン実践!
eltociear
2
1k
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.1k
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
0
240
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
390
理論と実務のギャップを超える
eycjur
0
130
XP, Testing and ninja testing ZOZ5
m_seki
3
630
株式会社 Sun terras カンパニーデック
sunterras
0
290
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
520
CSC305 Lecture 05
javiergs
PRO
0
210
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
170
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
860
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
KATA
mclloyd
32
15k
A designer walks into a library…
pauljervisheath
209
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
590
We Have a Design System, Now What?
morganepeng
53
7.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
20
1.2k
Unsuck your backbone
ammeep
671
58k
Designing Experiences People Love
moore
142
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
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?> <?