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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jeremy Lindblom
September 12, 2013
Programming
180
2
Share
PHP Closures - Lightning Talk
Lightning talk about Closures given on September 12th, 2013, to the Seattle PHP User Group.
Jeremy Lindblom
September 12, 2013
More Decks by Jeremy Lindblom
See All by Jeremy Lindblom
Diagram Like a Principal Engineer
jeremeamia
1
310
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
5.1k
What's New in PHP 7.4?
jeremeamia
0
250
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
260
Protecting Your Code From A Mischievous Future
jeremeamia
1
430
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
470
Uploading to S3 from PHP
jeremeamia
0
250
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.6k
aRESTful Development with the Wordpress API
jeremeamia
0
300
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
120
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
110
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.7k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
700
Don't Prompt Harder, Structure Better
kitasuke
0
790
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
実用!Hono RPC2026
yodaka
2
280
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
500
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
880
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
Featured
See All Featured
From π to Pie charts
rasagy
0
180
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Exploring anti-patterns in Rails
aemeredith
3
340
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
The Spectacular Lies of Maps
axbom
PRO
1
720
Embracing the Ebb and Flow
colly
88
5k
Paper Plane
katiecoart
PRO
1
49k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
230
Paper Plane (Part 1)
katiecoart
PRO
0
6.9k
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?> <?