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
自作OSSとPHP7対応
Search
fortkle
February 05, 2016
Technology
2.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
自作OSSとPHP7対応
fortkle
February 05, 2016
More Decks by fortkle
See All by fortkle
無駄な物をなるべく作らないリプレイス戦略 / replace-strategy-phperkaigi2021
fortkle
1
2.8k
フルリモート時代のカンバン運用 / kanban-operation-in-remote
fortkle
0
800
GitHub Actionsで始めるPHPアプリケーションのCI実践入門 / ga-phperkaigi2020
fortkle
3
7.3k
余裕を生み出すコードレビュー 〜レビュイー編〜 / code-review-phpcon-2019
fortkle
8
7.6k
「設計振り返り」を始めてみようと思っている話 / architecture reflection
fortkle
3
650
「ママ向けNo.1アプリ」の 更なる成長を支える仕組み / startup-engineer-night-connehito
fortkle
2
370
良いテストデータ、悪いテストデータ / testdata-antipattern
fortkle
4
7k
BackstopJSで始める CSSリグレッションテスト / backstopjs-css-test
fortkle
0
1.6k
PhpStorm導入アンチパターン / phpstorm-anti-pattern
fortkle
0
2.2k
Other Decks in Technology
See All in Technology
外国人エンジニアがVueプロトタイプで仕様を合わせている話 / Vue Fes Japan 2026 LT
eluwing
0
370
構造で守らせる データ・法務・セキュリティ・開発チームとつくる AI時代のデータガバナンスとデータ基盤のリアル
legalontechnologies
PRO
3
710
eBPF 簡介 2026 版
shunghsiyu
0
120
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
1
800
Deep Data Security 機能解説
oracle4engineer
PRO
3
980
re:Invent の去年のスケジュールを公開します!
miu_crescent
PRO
0
150
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
6
2.7k
GitHub、使う?使わない?
happysamurai294
0
140
AIコーディングはじめました
miso
0
130
20261031_IoTLT_vol140_kitazaki_v1.pdf
kitazaki
0
150
バイブコーディングの特徴と「コケて直す」ループ
happysamurai294
0
140
Adversary Infrastructure Hunting101
disconinja
0
190
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
290
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
500
The World Runs on Bad Software
bkeepers
PRO
72
12k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
It's Worth the Effort
3n
188
29k
Producing Creativity
orderedlist
PRO
348
41k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
380
Building Adaptive Systems
keathley
44
3.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
510
Test your architecture with Archunit
thirion
2
2.5k
4 Signs Your Business is Dying
shpigford
187
23k
Transcript
ࣗ࡞OSSͱPHP7ରԠ ߴ ߊ @fortkle - PHP7 Casual Talks #1
ࣗݾհ • @fortkle • Connehito גࣜձࣾ (ϚϚ͚αʔϏε mamari) • ੜਮͷPHPer
• ࠷ۙͷझຯɺGoͰWebΞϓϦέʔγϣϯ։ൃ
ϝσΟΞ ϢʔβʔࢀՃܕΞϓϦ mamari jp mamari Q ϚϚͷ 3ਓʹ1ਓ ͕ར༻ʂ
ࢀরɿGoogle Analytics ݄ؒར༻ऀ 400ສਓ Ҏ্ ϚϚϦ ৷ɾग़࢈ɾࢠҭͯதͷ ঁੑʹ͚ͨϝσΟΞ&ίϛϡχςΟͰ͢ɻ
͋ΔͷCTOͱͷձ
CTOʮPHP7͍͜͏ʯ @fortkleʮPHP7͍͖·͠ΐ͏ʯ
PHP7ಋೖܾఆ
CTOʮ͓͠ʂ·ͣ͋ͷཧը໘ͩɻ ɹɹɹPHP5.4͔ΒͷҠߦཔΜͩͧʂʯ @fortkleʮΓ·͠ΐ͏ʂ ɹɹɹɹɹ(…ͯ͞ɺͲ͏ͨ͠ͷ͔)ʯ
PHP7Ҡߦͷน͕… • ѹత @fortkle ͷPHP7ܦݧෆ • ࣮ࡍʹ͍ͬͯΔطଘΞϓϦέʔγϣϯΛ PHP7ʹͤ͑ͨ͜ͱ͕ͳ͔ͬͨ • Կ͔ੜ͚ᩴͰ͋Ε1ࢼ͠t(…
͍ɺੜ͚ᩴͳΒ͋Δ…!
ࣗ࡞OSSͷใڞ༗πʔϧ
None
None
None
owl/owl • ࣗ࡞ͨ͠OSSͷใڞ༗πʔϧ (Laravel) • ex. ) Qiita:Team, esa.io, Docbase
…etc • ϝϞπʔϧͱͯ͠EvernoteͷΘΓʹݸਓ༻ • AWS্Ͱಈ͔ͯ͠ຖ͍ͬͯΔ • https://github.com/owl/owl
͜ΕΛPHP7ʹͤ͑ʂ OSSੜ͚ᩴϝιου(Ծ)
ͱ͍͏༁Ͱ ࣗ࡞OSSͷPHP7ରԠ
owlͷঢ়گ • Laravel 5.0.33 • Server • CentOS6.5 • PHP5.4
• SQLite3 • Apache + mod_php
PHP7ͤ͑5ͭͷϙΠϯτ 1. ૬खΛΔɺΰʔϧΛܾΊΔ 2. ڥͷίʔυԽ 3. ϥΠϒϥϦɺϞδϡʔϧͷରԠঢ়گΛνΣοΫ 4. ΞϓϦ෦ͷରԠঢ়گΛνΣοΫ 5.
ςετΛճ͢
1. ૬खΛΔɺΰʔϧΛܾΊΔ
1. ૬खΛΔɺΰʔϧΛܾΊΔ • PHP7Ͱͷมߋɺޙํޓੑͷཧղ • ʮPHP 5.6.x ͔Β PHP 7.0.x
ͷҠߦʯ http://php.net/manual/ja/migration70.php • ʮPHP7ͰมΘΔ͜ͱ ——ݴޠ༷ͱΤϯδϯͷվળϙΠϯτʯ http://www.slideshare.net/hnw/phpcon-kansai20150530
1. ૬खΛΔɺΰʔϧΛܾΊΔ • ࠓճʮPHP7Β͠͞ʯٻΊͣɺͤ͑ࣗ ମΛΰʔϧʹ্͠Λతͱͨ͠ PHP7Β͠͞ ߴ PHP7Β͠͞ ɾ͚ͨͩͤ͑ͨͩ
ɾPHP7Ͱొͨ͠৽͍͠ԋࢉࢠɺߏจͷ׆༻ ɾεΧϥʔͷܕએݴɺΓͷܕએݴ ɾແ໊Ϋϥε ɾNull߹ମԋࢉࢠɺӉધԋࢉࢠ ← ɹɹɹࠓճͪ͜Βʂ
2. ڥͷίʔυԽ
2. ڥͷίʔυԽ • PHP7ͰऴΘΓͰͳ͍ • 8,9ͱࠓޙܧଓతʹVerUp͢Δඞཁ͕͋Δ • VerUpʹରͯ͠ʢมԽʹରͯ͠ʣରԠ͢ΔͨΊ ʹඞཁͳͷ͕ʮڥͷίʔυԽʯɻ ߏཧΛ͠Α͏ɻ
2. ڥͷίʔυԽ • Մಡੑɺอकੑɺႈੑ • ϓϩϏδϣχϯάπʔϧΛ׆༻͢Δ • Ansible • ʮInstall
PHP7 on CentOS7 by Ansibleʯ http://www.slideshare.net/DQNEO/install-php7-on-centos7-by-ansible • Itamae • ձࣾͰͪ͜ΒΛͬͯΔͷͰowlͪ͜Β • chefΑΓγϯϓϧ • PHP7.0.2ɺSQlite3ɺnginx+PHP-FPMɺCentOS7ڥΛߏங
3. ϥΠϒϥϦɺϞδϡʔϧͷ ରԠঢ়گΛνΣοΫ
3. ϥΠϒϥϦɺϞδϡʔϧͷ ରԠঢ়گΛνΣοΫ • ϥΠϒϥϦ,WAFͷରԠঢ়گ • ʮ˓˓ PHP7ʯͰάάΕେମ͔Δ • ओཁͳͷطʹPHP7ରԠࡁΈ
• ϞδϡʔϧͷରԠঢ়گ • ঢ়گΛ·ͱΊ͍ͯΔPJT͕͋Δ https://github.com/gophp7/gophp7-ext/wiki/ extensions-catalog
4. ΞϓϦ෦ͷରԠঢ়گΛ νΣοΫ
4. ΞϓϦ෦ͷରԠঢ়گΛνΣοΫ • αʔόʔɺϞδϡʔϧɺϥΠϒϥϦɺWAFͰ ͳͯ͘ɺΞϓϦ͕PHP7ඇରԠͳΒҙຯ͕ ແ͍ • खͬऔΓૣ͘PHP7ରԠΛνΣοΫ͢Δʹ php7cc Λ͏ͷ͕Φεεϝ
https://github.com/sstalle/php7cc
4. ΞϓϦ෦ͷରԠঢ়گΛνΣοΫ • php7cc • PHP7ͱͷద߹ੑΛνΣοΫͯ͘͠ΕΔ // μϯϩʔυ $ wget
https://github.com/sstalle/php7cc/releases/ download/1.0.2/php7cc.phar // νΣοΫ(ϑΝΠϧ or ϑΥϧμΛ͢) $ php php7cc.phar --extensions=php ./index.php
4. ΞϓϦ෦ͷରԠঢ়گΛνΣοΫ • νΣοΫରͷ index.php <?php class String{ public $hoge
= "hoge"; public function String() { echo "construct!!"; } public function echoHoge() { echo $this->hoge; } }
4. ΞϓϦ෦ͷରԠঢ়گΛνΣοΫ • ݁Ռ $ php php7cc.phar --extensions=php ./index.php File:
/Users/fortkle/Private/owl/index.php > Line 3: Reserved name "string" used as a class, interface or trait name class String { } > Line 7: PHP 4 constructors are now deprecated public function String() { }
4. ΞϓϦ෦ͷରԠঢ়گΛνΣοΫ • ͪͳΈʹ… • owl Ͱ࣮ߦͨ͠ͱ͜Ζɺमਖ਼͕ඞཁͳՕॴ 0 Ͱͨ͠ʢPHP7ͷޙํޓੑߴ͍ʂʣ
5. ςετΛճ͢
5. ςετΛճ͢ • 4. ͷphp7ccͳͲΛ׆༻ͯ͠PHP7ʹରԠͰ͖ͯ ͍ͳ͍ίʔυΛमਖ਼͢Δ • ςετΛ࣮ߦ͠ɺΞϓϦέʔγϣϯ͕յΕ͍ͯ ͳ͍͔ɺ͓͔͠ͳͱ͜Ζͳ͍͔νΣοΫ •
TravisCIͳΒ1ߦ͚Ճ͑Δ͚ͩͰPHP7ରԠՄ $ cat .travis.yml language: php php: - 5.6 - 7.0
Ҏ্ͷεςοϓΛܦͯ…
Ҡߦྃʂʂʂ • 40~50%΄ͲϖʔδಡΈࠐΈ͕վળʂ Buildin Server + Laravel DebugbarͰ5ճͣͭܭଌ
Ҡߦྃʂʂʂ Buildin Server + Laravel DebugbarͰ5ճͣͭܭଌ
Ҡߦྃʂʂʂ • PHP7Ҡߦͷܦݧήοτʂ • PHP7 Support ͷowlΛϦϦʔεʂ
ͦͷޙ…
ಉ༷ͷखॱͰཧը໘ͷPHP7Ҡߦ • खॱશ͘มΘΒͳ͍ • ΰʔϧ͕ܾ·͍ͬͯΔͷͰແཧͳ͘Ͱ͖Δ • ϨΠϠʔຖʹஸೡʹ࡞ۀ͍ͯ͘͠ख๏ͳͷͰ ҆৺Ͱ͖Δ( ˘ω˘)ţźō •
ܧଓతͳվળ͕Ͱ͖ΔʢPHP7͕ۀͰ͑ͯϞνϕʔ γϣϯ͕͕͋Δʂʂʂˡॏཁʣ
·ͱΊ • झຯ(OSS)ͰϦεΫΛ͠ɺۀʹͦΕΛؐݩ͢Δ ʮOSSੜ͚ᩴϝιουʯ͕ྑ͍ • PHP7ҠߦϨΠϠʔຖʹ͚ͯςετ͍͚ͯ͠ ൺֱత༰қʢPHP7Β͠͞Λٻ͢Δͱқˢʣ • PHP7ΛۀͰ͑Δͱָ͍͠ ✌('ω')✌
͓͠·͍