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
250
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.9k
What's New in PHP 7.4?
jeremeamia
0
210
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
240
Protecting Your Code From A Mischievous Future
jeremeamia
1
360
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
420
Uploading to S3 from PHP
jeremeamia
0
210
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.4k
aRESTful Development with the Wordpress API
jeremeamia
0
250
Other Decks in Programming
See All in Programming
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
4.9k
品質ワークショップをやってみた
nealle
0
620
CSC509 Lecture 07
javiergs
PRO
0
240
ALL CODE BASE ARE BELONG TO STUDY
uzulla
27
6.7k
SODA - FACT BOOK(JP)
sodainc
1
8.7k
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
360
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
110
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
800
CSC305 Lecture 09
javiergs
PRO
0
310
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
260
技術的負債の正体を知って向き合う
irof
0
230
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
209
24k
How STYLIGHT went responsive
nonsquared
100
5.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How GitHub (no longer) Works
holman
315
140k
Faster Mobile Websites
deanohume
310
31k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Scaling GitHub
holman
463
140k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
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?> <?