Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
270
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
5k
What's New in PHP 7.4?
jeremeamia
0
220
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
250
Protecting Your Code From A Mischievous Future
jeremeamia
1
390
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
440
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
270
Other Decks in Programming
See All in Programming
TestingOsaka6_Ozono
o3
0
170
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
160
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
120
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
250
AIコーディングエージェント(Manus)
kondai24
0
210
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
150
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
170
チームをチームにするEM
hitode909
0
370
Python札幌 LT資料
t3tra
6
1k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
360
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
83
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
260
We Are The Robots
honzajavorek
0
120
Become a Pro
speakerdeck
PRO
31
5.7k
Facilitating Awesome Meetings
lara
57
6.7k
Marketing to machines
jonoalderson
1
4.3k
Navigating Weather and Climate Data
rabernat
0
50
How to train your dragon (web standard)
notwaldorf
97
6.4k
Deep Space Network (abreviated)
tonyrice
0
20
Automating Front-end Workflow
addyosmani
1371
200k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
91k
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?> <?