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
230
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.9k
What's New in PHP 7.4?
jeremeamia
0
190
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
230
Protecting Your Code From A Mischievous Future
jeremeamia
1
340
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
400
Uploading to S3 from PHP
jeremeamia
0
190
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.4k
aRESTful Development with the Wordpress API
jeremeamia
0
230
Other Decks in Programming
See All in Programming
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
710
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
為你自己學 Python - 冷知識篇
eddie
1
350
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
510
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
2.4k
Deep Dive into Kotlin Flow
jmatsu
1
360
AIでLINEスタンプを作ってみた
eycjur
1
230
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
私の後悔をAWS DMSで解決した話
hiramax
4
210
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
個人開発で徳島大学生60%以上の心を掴んだアプリ、そして手放した話
akidon0000
1
140
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
696
190k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Building Applications with DynamoDB
mza
96
6.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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?> <?