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
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ikuwow
July 08, 2015
Programming
2.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
技術書紹介 パーフェクトPHP
ikuwow
July 08, 2015
More Decks by ikuwow
See All by ikuwow
Elasticsearch on EC2からAmazon Elasticsearch Serviceに 移行してだいぶ楽になった話
ikuwow
0
3.6k
意外と使える! Alibaba Cloud
ikuwow
0
250
teratailの解析基盤をEFKで作っていろいろ楽しい話
ikuwow
0
930
UNIXという考え方
ikuwow
1
2.1k
みんなもMiddlemanで技術ブログ作って幸せになろう!
ikuwow
0
1k
PHPサイバーテロの技法 書籍紹介
ikuwow
0
1k
Other Decks in Programming
See All in Programming
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5k
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
560
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
500
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
210
Agents on Rails - Rails at Scale 2026
irinanazarova
0
350
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
400
Heart of Swift Concurrency
koher
0
1.2k
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
350
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
350
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
120
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Six Lessons from altMBA
skipperchong
29
4.5k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
970
Claude Code のすすめ
schroneko
67
230k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
350
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
Chasing Engaging Ingredients in Design
codingconduct
0
350
Transcript
ٕज़ॻհɿ ύʔϑΣΫτPHP 2015/07/08 @ikuwow
ࣗݾհ • ग़ز • ϚΠϒʔϜɿReact.js • ͖ͳࡊ ωΪ @ikuwow
ຊͷ֓ཁ • 2010ॳ൛ୈ1ൃߦ • ݁ߏްͯ͘ॏ͍ • PHPͷਓʹฉ͘ͱ͍͍ͩͨ࣋ͬ ͯΔ or ಡΜͩ͜ͱ͋Δ
• ରಡऀதڃऀҎ্ʢPHPͰ ৗతʹ։ൃΛ͖ͯͨ͠ਓ or ଞͷݴޠΛ͍͜ͳ͍ͯ͠Δ͕ PHPͷ͜ͱΛΑ͘Βͳ͍ਓʣ
ʮPHPCݴޠͰهड़͞Ε͍ͯ ΔͨΊɺCݴޠ͕Θ͔Βͳ͍ͱ ཧղ͢Δ͜ͱ͍͠Ͱ͠ΐ͏ʯ ʘ·͡Ͱʗ ʢୈҰষ ίϥϜʣ
࣍ • ୈ1෦ PHPͷ֓ཁ • ୈ2෦ PHPͷݴޠ༷ • ୈ3෦ ࣮ફWebΞϓϦέʔγϣϯ
• ୈ4෦ PHPηΩϡϦςΟ • ୈ5෦ ςΫχΧϧͳPHPͷ׆༻ ͕͜͜ ໘ന͍
ʮୈ3෦ ࣮ફWebΞϓϦέʔ γϣϯʯ͕͍͢͝ • ୈ6ষ ࣮ફWebΞϓϦέʔγϣϯ • ୈ7ষ ϑϨʔϜϫʔΫʹΑΔޮతͳ։ൃ •
ୈ8ষ ϛχϒϩάΞϓϦέʔγϣϯ։ൃ DBͬͨ؆୯ͳΞϓϦέʔγϣϯ࡞ MVCϑϨʔϜϫʔΫͷ࡞ ʂʁ ϑϨʔϜϫʔΫΛͬͨϛχϒϩά։ൃ ʂʁ
MVCϑϨʔϜϫʔΫΛ࡞Δ • ClassLoader, Controller, RouterΫϥεͳ ͲΛόονϦ࡞Γ͜Ή • ࣍ͷষͰϑϨʔϜϫʔΫΛར༻ͯ͠ϛχ ϒϩάΞϓϦέʔγϣϯΛ࡞Δ <?php
class ClassLoader { protected $dirs; public function register() { spl_autoload_register(array($this, 'loadClass')); } public function registerDir($dir) { $this->dirs[] = $dir; } public function loadClass($class) { foreach ($this->dirs as $dir) { $file = $dir . '/' . $class . '.php'; if (is_readable($file)) { require $file; return; } } } }
ͨΊʹͳΔ͜ͱ • ੜPHPͱϑϨʔϜϫʔΫͷ͕ؒΘ͔Δʂ => ϧʔςΟϯά͔Β֤छΦϒδΣΫτΛखΛಈ͔ ͠ͳ͕Β࡞Δ͜ͱͰMVCϑϨʔϜϫʔΫͷཧղ͕ ਂ·Δ • ॳ৺ऀΛͨ͠Ϩϕϧͷਓ͕ؒҧ͕͑ͪͳ༷Λ த৺ʹઆ໌͞Ε͍ͯΔʢ
‘0’ == ‘0.0’ ͕trueʹͳ ΔɺͳͲʣ
ͦͷଞΑ͍ͱ͜Ζ • ηΩϡϦςΟʹଟ͘ϖʔδΛׂ͍͍ͯΔ • php.iniͷσΟϨΫςΟϒҰཡ • PHPͷϏϧυΦϓγϣϯҰཡ —with-xml, —enable-soap •
Ҏ֎ͳݴޠ༷ʹͨ͠આ໌ ʢ ‘0’ == ‘0.0’ ͕trueʹͳΔɺͳͲʣ
ಡΉͱ͍͍ਓ Ͳ͔͜Ͱݟֶͨशۂઢ 1)1ͷ࣮ྗ ֶश࣌ؒ ͍֮ࣗͯ͠Δ࣮ྗ ࣮ࡍͷ࣮ྗ աڈʹʮPHP͙Β͍Ͱ͖·͢Αʯͱ ΄͍͍ͯͨࣗ͟ΛռΊɺਅͷPHPerΛࢦͨ͢ΊͷҰ
·ͱΊ • MVCϑϨʔϜϫʔΫΛ࡞Δষʹ • ࣗͷֶशϑΣʔζor࣮ྗʹݟ߹͍ͬͯΔͱ ຊʹ໘ന͍ຊ • ͜ΕΛखΛಈ͔͠ͳ͕ΒશͯಡΈ͖ͬͯཧղ ͨ͠ΒʮPHPͰ͖Δʯͱࣗ৴Λͬͯݴ͑Δ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠