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
120
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
4.7k
What's New in PHP 7.4?
jeremeamia
0
110
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
160
Protecting Your Code From A Mischievous Future
jeremeamia
1
230
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
300
Uploading to S3 from PHP
jeremeamia
0
110
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.2k
aRESTful Development with the Wordpress API
jeremeamia
0
170
Other Decks in Programming
See All in Programming
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
230
Go の GC の不得意な部分を克服したい
taiyow
3
840
良いユニットテストを書こう
mototakatsu
8
3.1k
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
Jakarta EE meets AI
ivargrimstad
0
280
MCP with Cloudflare Workers
yusukebe
2
230
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
510
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
980
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
650
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
530
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
190
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
Featured
See All Featured
Making Projects Easy
brettharned
116
6k
Six Lessons from altMBA
skipperchong
27
3.5k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
How to train your dragon (web standard)
notwaldorf
88
5.7k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building Applications with DynamoDB
mza
91
6.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
110
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
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?> <?