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
550
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
파급효과: From AI to Android Development
l2hyunwoo
0
150
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
10
3.6k
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
130
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
220
カオスに立ち向かう小規模チームの装備の選択〜フルスタックTSという装備の強み _ 弱み〜/Choosing equipment for a small team facing chaos ~ Strengths and weaknesses of full-stack TS~
bitkey
1
130
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
220
Making TCPSocket.new "Happy"!
coe401_
1
2.8k
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
11k
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.4k
2ヶ月で生産性2倍、お買い物アプリ「カウシェ」4チーム同時改善の取り組み
ike002jp
1
110
Make Parsers Compatible Using Automata Learning
makenowjust
2
6.7k
状態と共に暮らす:ステートフルへの挑戦
ypresto
3
1.1k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
KATA
mclloyd
29
14k
Unsuck your backbone
ammeep
671
57k
Automating Front-end Workflow
addyosmani
1370
200k
Code Reviewing Like a Champion
maltzj
523
40k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Designing Experiences People Love
moore
142
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Raft: Consensus for Rubyists
vanstee
137
6.9k
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Λ͏͜ͱͰҰ୴ճආͨ͠