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
stdClassって一体何者なんだ?!/Who the hell is stdClass?
Search
寺西帝乃
March 24, 2023
Technology
2.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
stdClassって一体何者なんだ?!/Who the hell is stdClass?
3/24 PHPer Kaigi 2023 Day1 LT
寺西帝乃
March 24, 2023
Other Decks in Technology
See All in Technology
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
390
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
1
670
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
410
AWSセキュリティで活用するAI機能
cmusudakeisuke
1
250
What Is JetBrains Air
x5gtrn
PRO
0
160
【データ横丁主催】AI エージェント時代のTranslytical Data Platform
shisyu_gaku
0
270
Microsoft のサポート ライフサイクルを理解する
murachiakira
PRO
0
140
Codex を使った障害対応机上演習の実際
orgachem
PRO
0
330
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
250
QAエンジニアがSoutherを使ってみたの〜10分でわかるSouther〜
mhlyc
0
110
プロダクトが成長すると、 プロダクトマネージャーの仕事はどう変わるのか - 「まず作る」から「小さく学び、確かめながら進む」へ
sansantech
PRO
0
120
アカウント統制の健康診断
kenichinakamura
1
160
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
530
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
Mind Mapping
helmedeiros
1
400
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Product Roadmaps are Hard
iamctodd
55
13k
Transcript
ʁ גࣜձࣾϥΫε ࣉ ఇ೫ stdClassって⼀体何者なんだ︖︕
⾃⼰紹介 ࣉ ఇ೫ (ͯΒʹ͠ ͍ͩͳ) • גࣜձࣾϥΫε • νϟοτσΟʔϥʔ։ൃ՝ •
໊લͷ༝དྷϧτϥϚϯ ܦྺ • େࡕߴઐˠେֶਐֶ (2022ଔ) • ΤϯδχΞྺ 11Χ݄ • PHPྺ 8Χ݄
こんなことをお話しします︕ こんな⽅にオススメ︕ ✓ TUE$MBTT͕Α͘Θ͔Βͳ͍ॳ৺ऀ1)1FS ✓ ࠓ·ͰͳΜͱͳ͖ͬͯͨ͘தݎ1)1FS ✓ ࠓޙTUE$MBTTΛม͑ͯ͘ΕΔϕςϥϯ1)1FS TUE$MBTTͷੜํ๏
TUE$MBTTʹͰ͖Δ͜ͱɾͰ͖ͳ͍͜ͱ TUE$MBTTʹؔ͢Δٞ ͱ͋Δ։ൃऀͷߟ͑
1. stdClassの⽣成⽅法 ✓ OFXԋࢉࢠΛͬͨΠϯελϯεԽ ✓ ΦϒδΣΫτܕͷஔ ✓ ͍ΖΜͳؔͷฦΓͱͯ͠औಘ
2. stdClassにできること・できないこと 連想配列みたいに値を格納できるよ︕
連想配列みたいに値を格納できるよ︕ 2. stdClassにできること・できないこと 似たことができるのに配列と 書き⽅が異なるからややこしいね
2. stdClassにできること・できないこと 配列みたいにforeach⽂で回せるよ︕
2. stdClassにできること・できないこと 配列型みたいにforeach⽂で回せるよ︕ 配列の関数は使えないけどね・・・ ex) array_map, array_filer, array_merge, count, …
2. stdClassにできること・できないこと stdClassを継承したら動的プロパティを使えるよ︕
stdClassを継承したら動的プロパティを使えるよ︕ 2. stdClassにできること・できないこと 意図しないプロパティが⽣成されても 検知できないけどね。 PHP8.2で議論になってたのに・・・
ごめん、君苦⼿かも。 2. stdClassにできること・できないこと 結局stdClassって 何者なん︖︖
3. stdClassに関する議論 .BLJOHTUE$MBTTJUFSBCMF ✓TUE$MBTT5SBWFSTBCMFΠϯλʔϑΣʔεΛ࣮͢Δ ✓TUE$MBTTΛྻͱಉ͡ѻ͍ʹ͢Δ Ԡ ✓TUE$MBTT͕ྻͷΑ͏ͳΘΕํΛ͍ͯ͠Δೝ͍ࣝͯ͠Δ ✓ؔʹྻΛฦ͢Α͏ཁٻ͢Εྑ͍ ✓TUE$MBTTͷҙຯΛׂ͑ͨΛ࣋ͨͤΔͷࢍಉͰ͖ͳ͍
3. stdClassに関する議論 "MJBTTUE$MBTTUP%ZOBNJD0CKFDU ✓%ZOBNJD0CKFDUͱ͍͏ΤΠϦΞεΛՃ͢Δ ✓TUE$MBTTͷ໊લͱׂʹဃ͕͋Δ͔Β Ԡ ✓ଟ͘ͷࢍಉΛಘ͍ͯͨ ✓͔͠͠طଘίʔυɺςετίʔυͷӨڹ͕ൣғ ✓ӨڹͷׂʹϝϦοτ͕গͳ͍
4. とある開発者の考え Nikita Popov
4. とある開発者の考え Mind you, stdClass is an anti-pattern. Instead of
stdClass you should just be using an array. We should never have added stdClass. Nikita Popov
4. とある開発者の考え Mind you, stdClass is an anti-pattern. Instead of
stdClass you should just be using an array. We should never have added stdClass. Nikita Popov ʢಈతϓϩύςΟͱಉ͡Α͏ʹ TUE$MBTTഇࢭʹ͔ͨͬͨ͠Ζ͏ͳʣ
まとめ TUE$MBTTͬͯҰମԿऀͳΜͩʁʂ ✓1)1Ҏ߱ͰಈతϓϩύςΟ͕͑ΔۭͷΫϥε ✓ϨΨγʔίʔυͰྻͷΑ͏ͳΘΕํΛ͍ͯ͠Δ TUE$MBTTͷཱͪҐஔ ✓ྑ͘ࢥ͍ͬͯͳ͍։ൃऀ͕Ұఆଘࡏ͢Δ ✓ͨͩ͘͠ΘΕ͍ͯΔͨΊɺͳ͔ͳ͔มߋͰ͖ͳ͍ ✓ࠓޙTUE$MBTT͕ྑ͍ѻ͍Λͯ͠Β͑Δ͜ͱΛئ͏