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
290
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
5.1k
What's New in PHP 7.4?
jeremeamia
0
230
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
250
Protecting Your Code From A Mischievous Future
jeremeamia
1
410
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
450
Uploading to S3 from PHP
jeremeamia
0
230
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.5k
aRESTful Development with the Wordpress API
jeremeamia
0
280
Other Decks in Programming
See All in Programming
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
Basic Architectures
denyspoltorak
0
670
CSC307 Lecture 04
javiergs
PRO
0
660
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
CSC307 Lecture 08
javiergs
PRO
0
670
Fluid Templating in TYPO3 14
s2b
0
130
MUSUBIXとは
nahisaho
0
130
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
98
Visualization
eitanlees
150
17k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
How GitHub (no longer) Works
holman
316
140k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
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?> <?