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
310
PHP7.2で始める型宣言
gs3
0
540
ISUCONのすゝめ // OUR ISUCON
gs3
3
1.3k
オブジェクト指向設計とデザインパターンの基礎 / Basics of object oriented design and design pattern
gs3
2
100k
1人から始める大規模Webアプリケーションの言語バージョンアップ / version up PHP in large scale application
gs3
20
5k
PHP 5.4 ~ 5.6 での追加機能のおさらいとバージョンアップへの誘い / php54 to 56 and version up
gs3
1
2.3k
ペパボを支える大統一CI基盤と人々
gs3
2
4k
PHP 5.3.x のアプリを PHP 7.0.x で動かすためにした n 個のこと
gs3
1
1.5k
今までやってきたこと これからやりたいこと
gs3
0
2.3k
Other Decks in Programming
See All in Programming
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
880
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
110
iOS開発におけるCopilot For XcodeとCode Completion / copilot for xcode
fuyan777
1
1.1k
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
410
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
260
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
170
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
960
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
130
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
6
1.3k
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
360
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
6
1.3k
MCP with Cloudflare Workers
yusukebe
2
260
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Practical Orchestrator
shlominoach
186
10k
The Language of Interfaces
destraynor
155
24k
Git: the NoSQL Database
bkeepers
PRO
427
64k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Designing for Performance
lara
604
68k
GraphQLとの向き合い方2022年版
quramy
44
13k
BBQ
matthewcrist
85
9.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
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Λ͏͜ͱͰҰ୴ճආͨ͠