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
190
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.9k
What's New in PHP 7.4?
jeremeamia
0
160
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
200
Protecting Your Code From A Mischievous Future
jeremeamia
1
310
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
360
Uploading to S3 from PHP
jeremeamia
0
160
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.4k
aRESTful Development with the Wordpress API
jeremeamia
0
210
Other Decks in Programming
See All in Programming
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
930
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
260
ニーリーにおけるプロダクトエンジニア
nealle
0
870
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
210
Goで作る、開発・CI環境
sin392
0
240
VS Code Update for GitHub Copilot
74th
2
660
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
640
AIともっと楽するE2Eテスト
myohei
7
2.8k
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
840
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
110
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
170
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
240
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Git: the NoSQL Database
bkeepers
PRO
430
65k
The Invisible Side of Design
smashingmag
301
51k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
6
310
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
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?> <?