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
290
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
5.1k
What's New in PHP 7.4?
jeremeamia
0
230
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
250
Protecting Your Code From A Mischievous Future
jeremeamia
1
410
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
450
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
280
Other Decks in Programming
See All in Programming
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Package Management Learnings from Homebrew
mikemcquaid
0
210
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Architectural Extensions
denyspoltorak
0
280
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
600
CSC307 Lecture 05
javiergs
PRO
0
500
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Featured
See All Featured
The browser strikes back
jonoalderson
0
360
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Done Done
chrislema
186
16k
Faster Mobile Websites
deanohume
310
31k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Design in an AI World
tapps
0
140
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
210
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?> <?