Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHP Closures - Lightning Talk
Search
Jeremy Lindblom
September 12, 2013
Programming
200
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHP Closures - Lightning Talk
Lightning talk about Closures given on September 12th, 2013, to the Seattle PHP User Group.
Jeremy Lindblom
September 12, 2013
More Decks by Jeremy Lindblom
See All by Jeremy Lindblom
Diagram Like a Principal Engineer
jeremeamia
1
360
Async Guzzle - Concurrent HTTP Requests in PHP
jeremeamia
3
5.2k
What's New in PHP 7.4?
jeremeamia
0
280
Applied OOP Design Patterns: Rolling with the Punches
jeremeamia
1
290
Protecting Your Code From A Mischievous Future
jeremeamia
1
460
Iterators and Decorators and Generators, Oh My!
jeremeamia
1
500
Uploading to S3 from PHP
jeremeamia
0
270
APIs with Lumen, Guzzle, & Swagger
jeremeamia
24
7.7k
aRESTful Development with the Wordpress API
jeremeamia
0
320
Other Decks in Programming
See All in Programming
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
220
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.6k
Next.js: The final boss of Web Performance
guaca
0
260
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
280
すこし踏み込む CancellationToken
htkym
2
1.7k
ジョジョの世界をXRで再現する
mofurune
0
160
AmebaブログはKMPから卒業します
kmars0605
0
190
ActionController meets Protocol Buffers
sorah
0
530
Featured
See All Featured
Everyday Curiosity
cassininazir
0
350
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Embracing the Ebb and Flow
colly
88
5.2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
Build your cross-platform service in a week with App Engine
jlugia
234
19k
A Soul's Torment
seathinner
8
3.8k
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?> <?