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
0
42
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.5k
What's New in PHP 7.4?
jeremeamia
0
92
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
130
Protecting Your Code From A Mischievous Future
jeremeamia
1
150
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
260
Uploading to S3 from PHP
jeremeamia
0
89
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7k
aRESTful Development with the Wordpress API
jeremeamia
0
160
Other Decks in Programming
See All in Programming
OpenAPI を守るのは難しい
ohmori_yusuke
1
140
WinUI 3デモ - "CommunityToolkit.Mvvm"NuGetパッケージ編
andrewkeepcoding
0
130
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
1.7k
Laravel標準バリデーションでできること
hmb_ok
2
360
孤独のCTOグルメという やや奇抜な企画をやった目的と効果
shoheimitani
3
1k
[スクリプト] Swiftの型推論を学ぼう
omochi
0
110
Ruby製社内ツールのGo移行
bgpat
2
260
Open Source Swiftc Workshop
kitasuke
1
180
フロントエンドパフォーマンス 入門
shouta2
7
1.5k
Dockerで始めるAWS Lambda開発
stutkhd0709
13
2.5k
両面どころかインフラもTSでできるよ ~ 全方位TypeScriptによるプロダクト開発 ~
myfinder
8
2.2k
htmx is fun!
codehex
2
190
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Code Review Best Practice
trishagee
54
15k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2k
A Tale of Four Properties
chriscoyier
150
22k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Fontdeck: Realign not Redesign
paulrobertlloyd
75
4.8k
How GitHub Uses GitHub to Build GitHub
holman
467
290k
Adopting Sorbet at Scale
ufuk
66
8.5k
Infographics Made Easy
chrislema
237
18k
The Invisible Side of Design
smashingmag
293
49k
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.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?> <?