Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
240
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
260
Other Decks in Programming
See All in Programming
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
380
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
150
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
18
7.3k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
130
チームをチームにするEM
hitode909
0
310
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
300
AIコーディングエージェント(Manus)
kondai24
0
170
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
260
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
580
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
120
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
38
25k
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
Featured
See All Featured
Fireside Chat
paigeccino
41
3.7k
How STYLIGHT went responsive
nonsquared
100
6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Rails Girls Zürich Keynote
gr2m
95
14k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Six Lessons from altMBA
skipperchong
29
4.1k
Being A Developer After 40
akosma
91
590k
Raft: Consensus for Rubyists
vanstee
141
7.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
720
Code Reviewing Like a Champion
maltzj
527
40k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
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?> <?