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
あの日見たバグを僕達はまだ公式ドキュメントで見れない / The bug we saw tha...
Search
Yoshihide Taniguchi
January 31, 2017
Programming
1
1.5k
あの日見たバグを僕達はまだ公式ドキュメントで見れない / The bug we saw that day
2017/01/31 PHP 勉強会 での LT 資料です
Yoshihide Taniguchi
January 31, 2017
Tweet
Share
More Decks by Yoshihide Taniguchi
See All by Yoshihide Taniguchi
PHP がフロントエンドエンジニアになってみた // from PHPer to Frontend
gs3
1
320
PHP7.2で始める型宣言
gs3
0
560
ISUCONのすゝめ // OUR ISUCON
gs3
3
1.4k
オブジェクト指向設計とデザインパターンの基礎 / Basics of object oriented design and design pattern
gs3
2
100k
1人から始める大規模Webアプリケーションの言語バージョンアップ / version up PHP in large scale application
gs3
20
5.1k
PHP 5.4 ~ 5.6 での追加機能のおさらいとバージョンアップへの誘い / php54 to 56 and version up
gs3
1
2.4k
ペパボを支える大統一CI基盤と人々
gs3
2
4.1k
PHP 5.3.x のアプリを PHP 7.0.x で動かすためにした n 個のこと
gs3
1
1.6k
今までやってきたこと これからやりたいこと
gs3
0
2.3k
Other Decks in Programming
See All in Programming
Duke on CRaC with Jakarta EE
ivargrimstad
1
590
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
120
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
6
340
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
150
AI Coding Agent Enablement in TypeScript
yukukotani
15
6k
Feature Flag 自動お掃除のための TypeScript プログラム変換
azrsh
PRO
4
560
技術的負債と戦略的に戦わざるを得ない場合のオブザーバビリティ活用術 / Leveraging Observability When Strategically Dealing with Technical Debt
yoshiyoshifujii
0
160
クラシルリワードにおける iOSアプリ開発の取り組み
funzin
1
740
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
140
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
130
AI時代のリアーキテクチャ戦略 / Re-architecture Strategy in the AI Era
dachi023
0
180
Blueskyのプラグインを作ってみた
hakkadaikon
1
140
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Being A Developer After 40
akosma
91
590k
Designing Experiences People Love
moore
142
24k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Writing Fast Ruby
sferik
628
61k
Balancing Empowerment & Direction
lara
0
72
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Bash Introduction
62gerente
613
210k
The Invisible Side of Design
smashingmag
299
50k
Rails Girls Zürich Keynote
gr2m
94
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Code Reviewing Like a Champion
maltzj
523
40k
Transcript
୩ޱఓӳ!SBWFMMM ͋ͷݟͨόάͷৄࡉΛ ୡ·ͩ ެࣜυΩϡϝϯτͰ ݟΕͳ͍
ࠓ͢͜ͱ w1)1ͷόʔδϣϯΞοϓதʹ౿Μͩόάʹ͍ͭͯ wܦҢ wࣄ݅ wରԠ
୩ޱఓӳ@ravelll ( ͨʹ͙ͪc͙ͬ͞Μ ͱݺΕ͍ͯ·͢
1)1ͷόʔδϣϯΞοϓΛ͍ͬͯͨ w͋Δ8FCΞϓϦέʔγϣϯͷϩʔϧ $ wc -l $(find . -name \*.php) |
tail -1 325048 total w1)11)1 wίʔυमਖ਼͕΄΅΄΅ྃɺಈ࡞ݕূΛ͍ͯͨ͠
͋Εͬ͜ͷػೳಈ͔ͳ͍ʜ wϖʔδʹΞΫηεͨ͠ΒඇಉظʹσʔλΛऔಘɾඳը w"KBYͰ(&5ͯ͠KTPOड͚औͬͯඳը wKTPOऔಘ࣌ʹ1)1ଆͰΤϥʔ͕ग़͍ͯͨ •PHP Warning: mb_convert_variables(): Cannot handle recursive
references in ʙ
mb_convert_variables()
NC@DPOWFSU@WBSJBCMFT ͱʁ wมͷͷΤϯίʔσΟϯάΛม͢Δؔ ex) mb_convert_variables(‘UTF-8’, ’EUC-JP’, $var); w$varʹ4USJOH "SSBZ 0CKFDUΛͤΔ
wNC@DPOWFSU@FODPEJOHͱҾͷॱ͕ҧ͏ʢ͔Θ͍͍ʣ mb_convert_variables($to_enc, $from_enc, $var); mb_convert_encoding($str, $to_enc[, $from_enc]);
Cannot handle recursive references in …
Cannot handle recursive references in …
SFDVSTJWFͳSFGFSFODFTʁ
wͦΜͳྻ͍ͯ͠ͳ͍ͧʜʁ wͱ͍͏͔ [‘a’, ‘b’] Ͱ͢Βಉ͡ΤϥʔʹͳΔͧʁʁʁ Ͳ͔͜ͷόʔδϣϯͰ༷͕มΘͬͨʹҧ͍ͳ͍ʂ ެࣜυΩϡϝϯτΛಡ͏ʂʂ
None
ಛʹݴٴ͞Εͯͳ͍
ʔϜࠔͬͨʜ wόʔδϣϯΞοϓલޙͰ1)1ͷιʔεΛಡΈൺͯΈͨͷͷ $ݴޠྗ͕ͯ͘࠶ؼࢀরΛݕ͢ΔΈ͕૿͑ͯΔ͜ͱҎ֎Α ͔͘Βͳ͍ʜ wNC@DPOWFSU@FODPEJOHؔΛ͏Α͏ʹΞϓϦέʔγϣϯͷ࣮ Λ͍͔ͯ͘͠͠ͳ͍ͷ͔ʜ͍Ͱ݁ߏͬͯΔͱ͜Ζ͋Δʜ
None
None
Ξοοο
ؔͷόά༷ͩͬͨ ‣ୈҾʢมݩͷΤϯίʔσΟϯάʣʹͭҎ্ͷΤϯίʔσΟϯ άΛࢦఆͨ͠ͱ͖ɺมରͷ"SSBZͷ࠶ؼతࢀরͷݕ͕ࠪਖ਼ৗʹ Ͱ͖ͳ͍ ex) mb_convert_variables(‘UTF-8’, ‘EUC-JP,Shift_JIS’, $val); mb_convert_variables(‘UTF-8’, ‘auto’,
$val); (‘auto’ ΤΠϦΞεͰɺmbstring.language=Japanese ͷͱ͖ͳΒ ‘ASCII,JIS,UTF-8,EUC-JP,SJIS’)
मਖ਼ϓϧϦΫग़ͯͨʢʣ ‣·͞ʹɺͳςετ͕Ճ͞Ε͍ͯͨʜʂ
ରԠ wόά͕ੜ·ΕΔલͷόʔδϣϯʢʣΛ͏͜ͱʹͨ͠ w͏1)1ܥ"DUJWF4VQQPSUͰͳ͘ͳΓେ͖ͳػೳ Ճ͕ͳ͍ wࠓؤுͬͯͱ͔ʹ͢ΔΑΓ9ʹ͘͢ؤுͬͨ ΄͏͕Α͍ͷͰʜʁ
·ͱΊ wόʔδϣϯΞοϓதʹݴޠͷόάͱग़ձͬͨΛڞ༗͠·ͨ͠ wNC@DPOWFSU@WBSJBCMFTͰϋϚͬͨ wݪҼ͕υΩϡϝϯτʹॻ͔Εͯͳ͔ͬͨ ʢݴٴͨ͠Ϣʔβίϝϯτ͋ͬͨʣ wؔࣗମʹόά͕͋Δ͜ͱ͕͔ͬͨ w1)1Λ͏͜ͱͰҰ୴ճආͨ͠