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
170
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
130
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.8k
What's New in PHP 7.4?
jeremeamia
0
120
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
170
Protecting Your Code From A Mischievous Future
jeremeamia
1
260
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
310
Uploading to S3 from PHP
jeremeamia
0
120
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.3k
aRESTful Development with the Wordpress API
jeremeamia
0
180
Other Decks in Programming
See All in Programming
Better Code Design in PHP
afilina
0
170
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
270
Introduction to kotlinx.rpc
arawn
0
770
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
160
Rubyと自由とAIと
yotii23
6
1.8k
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
230
CI改善もDatadogとともに
taumu
0
200
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.3k
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
150
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
250
Formの複雑さに立ち向かう
bmthd
1
940
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
What's in a price? How to price your products and services
michaelherold
244
12k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Producing Creativity
orderedlist
PRO
344
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Visualization
eitanlees
146
15k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Making Projects Easy
brettharned
116
6k
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?> <?