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
300
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
260
Protecting Your Code From A Mischievous Future
jeremeamia
1
420
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
460
Uploading to S3 from PHP
jeremeamia
0
240
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.6k
aRESTful Development with the Wordpress API
jeremeamia
0
280
Other Decks in Programming
See All in Programming
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
250
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
560
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
270
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
220
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
450
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
260
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
360
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.3k
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
75
5.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Rails Girls Zürich Keynote
gr2m
96
14k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
150
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
390
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
110
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
69
Embracing the Ebb and Flow
colly
88
5k
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?> <?