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
190
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
320
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
270
Protecting Your Code From A Mischievous Future
jeremeamia
1
440
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
480
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
310
Other Decks in Programming
See All in Programming
今さら聞けないCancellationToken
htkym
0
220
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.5k
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
290
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
620
Moments When Things Go Wrong
aurimas
3
140
dRuby over BLE
makicamel
2
310
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
440
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
エージェンティックRAGにAWSで入門しよう!
har1101
7
900
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
180
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
My Coaching Mixtape
mlcsv
0
140
Google's AI Overviews - The New Search
badams
0
1k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
How to Ace a Technical Interview
jacobian
281
24k
Scaling GitHub
holman
464
140k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
690
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
410
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Paper Plane
katiecoart
PRO
1
51k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
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?> <?