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
有効な使い方を正しく理解して実装する PHP8.3の最新機能の「ウラ側」 / Understa...
Search
shiro seike
PRO
July 02, 2024
Programming
1
250
有効な使い方を正しく理解して実装する PHP8.3の最新機能の「ウラ側」 / Understanding and Implementing Effective Usage Correctly The "Uraside" of PHP 8.3's Latest Features
Fusic Tech Live Vol.20 〜PHPer CONNECT〜
https://fusic.connpass.com/event/317123/
shiro seike
PRO
July 02, 2024
Tweet
Share
More Decks by shiro seike
See All by shiro seike
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
740
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
350
地方のPHPerもクラウドを使う理由 ~コストの最適化とチームに向き合う~ / Why even local PHPers use the cloud ~optimize costs and face the team
seike460
PRO
0
62
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
170
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
1k
OpenTelemetryを活用したObservability入門 / Introduction to Observability with OpenTelemetry
seike460
PRO
1
640
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
310
Amazon Aurora DSQLパフォーマンスチェック / Amazon Aurora DSQL Performance Check
seike460
PRO
0
12
(再)ひとり技術広報からの脱却 / Re:Breaking away from one-man technical public relations
seike460
PRO
1
220
Other Decks in Programming
See All in Programming
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
650
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
0
310
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
570
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
500
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
440
Deep Dive into ~/.claude/projects
hiragram
12
2.3k
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
56
15k
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
110
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
1
8.2k
関数型まつりレポート for JuliaTokai #22
antimon2
0
160
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
270
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
400
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
The World Runs on Bad Software
bkeepers
PRO
69
11k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
GraphQLとの向き合い方2022年版
quramy
49
14k
Raft: Consensus for Rubyists
vanstee
140
7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Being A Developer After 40
akosma
90
590k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
How STYLIGHT went responsive
nonsquared
100
5.6k
Optimizing for Happiness
mojombo
379
70k
Transcript
©Fusic Co., Ltd. 1 ༗ޮͳ͍ํΛਖ਼͘͠ཧղ࣮ͯ͢͠Δ PHP8.3ͷ࠷৽ػೳͷʮϥଆʯ 2024.07.02 @seike460 Fusic Tech
Live Vol.20 ʙPHPer CONNECTʙ
©Fusic Co., Ltd. 2 ਗ਼Ո ࢙ @seike460 AWS Community Builders
Serverless ݄ؒPHPΧϯϑΝϨϯε2024 - PHPΧϯϑΝϨϯεւಓ2024 ొஃ (LT) - PHPΧϯϑΝϨϯεؔ2024 ొஃ (LT) - PHPerKaigi2024 ొஃ (LT) - PHPΧϯϑΝϨϯεখాݪ2024 ొஃ - PHPΧϯϑΝϨϯε߳2024 ొஃ - PHPΧϯϑΝϨϯεԬ2024 ొஃ ࣗݾհ ͡Ίʹ גࣜձࣾFusic ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. PHP8.3ͷϦϦʔεʹ͍ͭͯৼΓฦΔͰ৮Εͨ͜ͱ 2. ·ͩ·ͩ͋ΔɺPHP8.3ͷΞοϓσʔτ
3. ֤ػೳͷઆ໌ͱར༻ྫ 4. ࠷৽ใΛऔಘ͢Δखஈ 5. ·ͱΊ
©Fusic Co., Ltd. 4 PHP8.3ͷϦϦʔεʹ͍ͭͯৼΓฦΔ Ͱ৮Εͨ͜ͱ 1
©Fusic Co., Ltd. 5 ઌिͷPHPΧϯϑΝϨϯεԬ2024Ͱͷൃද༰
©Fusic Co., Ltd. 6 PHP8.3ͷϦϦʔεʹ͍ͭͯৼΓฦΔ - PHP 8.3.0 - 202311݄23
- PHP 8.3.1 - 202312݄21 - PHP 8.3.2 - 20241݄18 - PHP 8.3.3 - 20242݄15 - PHP 8.3.4 - 20243݄14 - PHP 8.3.6 - 20244݄11 - PHP 8.3.7 - 20245݄9 - PHP 8.3.8 - 20246݄6 ɹɹɹɹɹɹɹɹɹɹɹɹ˞PHP8.3.5ReleasePage͔Βআࡁ
©Fusic Co., Ltd. 7 PHP8.3ͷαϙʔτظݶ - Active Support - 202511݄23
ࠓ͔Β520 - Security Support - 202611݄23 ࠓ͔Β885
©Fusic Co., Ltd. 8 ʮPHP8.3ͷϦϦʔεʹ͍ͭͯৼΓฦΔʯͰ৮Εͨͷ
©Fusic Co., Ltd. 9 ࣮·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 10 ࣮·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 11 ࣮·ͩ·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 12 ࣮·ͩ·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 13 ࣮·ͩ·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 14 ࣮·ͩ·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 15 ࣮·ͩ·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 16 ࣮·ͩ·ͩ·ͩ·ͩ͋Γ·͢
©Fusic Co., Ltd. 17 ·ͩ·ͩ͋ΔɺPHP8.3ͷΞοϓσʔτ 2
©Fusic Co., Ltd. 18 PHPΧϯϑΝϨϯεԬ2024Ͱ৮Εͨࣄ - ػೳͱͯ͠ͷՃ - Ϋϥεఆͷܕ͚ -
Ϋϥεఆͷจࣈྻࢦఆ - Attribute#[\Override]ͷՃ - ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯ https://www.php.net/releases/8.3/ja.php
©Fusic Co., Ltd. 19 ຊͰ৮ΕΔࣄ - ແ໊Ϋϥεreadonly ͱͯ͠ϚʔΫͰ͖Δ - ϚδοΫϝιουͰ࡞ͬͨΫϩʔδϟ
໊લ͖ҾΛड͚ೖΕՄೳ - τϨΠτͷϝιουͷfinal ࢦఆ - static มͷॳظԽʹҙͷࣜར༻Մ https://www.php.net/manual/ja/migration83.new-features.php
©Fusic Co., Ltd. 20 ͓ؾʹೖΓͷίʔυγΣΞαʔϏε https://carbon.now.sh ͍ΖΜͳݴޠʹରԠͯͯ͠ ؾܰʹར༻Ͱ͖ΔͷͰΦεεϝ
©Fusic Co., Ltd. 21 ֤ػೳͷઆ໌ͱར༻ྫ 3
©Fusic Co., Ltd. 22 ͦͦແ໊Ϋϥεͱʁ ແ໊Ϋϥε ໊લΛ࣋ͨͳ͍Ϋϥε Ұ͚ͩ༻͢Δ߹ʹศར ར -
Ұ࣌༻͢ΔΦϒδΣΫτΛ͙͢ʹ ࡞Ͱ͖ίʔυͷ؆ܿ͞Λอͭ - ಗ໊ؔͱࣅ͍ͨํ͕Ͱ͖ɺ ؔϝιουͷҾͱͯ͢͠
©Fusic Co., Ltd. 23 ແ໊Ϋϥεʹͯreadonly͕ར༻Մೳʹ ྫ͑APIͷResponseͳͲɺ Ұઃఆͨ͠Βมߋͷඞཁ͕ͳ͍ͷ ࠨͷྫͷ߹ɺ ͢ͰʹHTTP OKͳΠϯελϯεͷ
εςʔλείʔυͷ্ॻ͖Λ͙ ͜͜ʹ readonly ͕ར༻Ͱ͖ͳ͍ ҧײΛղফͯ͠Δ෦͕େ͖ͦ͏
©Fusic Co., Ltd. 24 ͦͦmagic methodͱʁ PHPͰಛఆͷঢ়گԼͰ ࣗಈతʹݺͼग़͞ΕΔϝιου __construct() ɹΠϯελϯεԽ͞ΕΔͱ͖
__destruct() ɹΠϯελϯε͕ഁغ͞ΕΔͱ͖ __call() ɹଘࡏ͠ͳ͍ϝιου͕ ɹݺͼग़͞Εͨͱ͖
©Fusic Co., Ltd. 25 magic methodͰ࡞ΒΕͨClosureɿ໊લ͖Ҿ $seike->Magic(…)ʹͯClosure ͕ฦ͞ΕΔ ͦͷClosureʹʮShiroʯͱ͍͏ ໊લ͖ҾΛར༻ՄೳʹͳΔ
©Fusic Co., Ltd. 26 TraitͷΈ ΫϥεͰ࠶ར༻Մೳͳϝιουͷ ηοτΛఆٛ͢ΔͨΊͷΈ Use ExampleTrait; ʹͯ୯७ʹΠϯϙʔτ͢Δ͜ͱՄೳ
©Fusic Co., Ltd. 27 Trait Methodͷfinal ࢦఆ use ExampleTrait {
importantMethod as final; } ͷΑ͏ͳܗͰར༻Մೳʹ PHP8.2ͰΤϥʔʹͳΓ·͢
©Fusic Co., Ltd. 28 τϨΠτͷϝιουͷfinal ࢦఆ ࠓ·Ͱઈର্ॻ͖ͤͨ͘͞ͳ͔ͬͨ TraitϝιουOverrideग़དྷͯ͠·ͬͨ final ۟Λར༻͢Δ͜ͱͰ
OverrideΛېࢭͤ͞Δࣄ͕ग़དྷΔ
©Fusic Co., Ltd. 29 static มʹ͍ͭͯ static มʹ͍ͭͯ ؔϝιουͰએݴ ؔͷݺͼग़ؒ͠ͰͦͷΛอ࣋͢Δ
ॳظԽ͞ΕΔͱ࠶ݺͼग़͞Εͯ ͦͷΛอ࣋͢Δ
©Fusic Co., Ltd. 30 static มͷॳظԽʹҙͷࣜར༻Մ static มҙͷࣜΛຒΊࠐΈՄೳʹ Ұ͚ͩऔಘ͢Δ෦ʹࠩ͠ࠐΊΔ ྫ͑DBͷCounterͳͲʹར༻Մೳ
※ྫτϥϯβΫγϣϯ͕ແࢹ͞ΕΔ ਅࣅ͠ͳ͍Ͱ͍ͩ͘͞… Ұ͔͠ݺΕͳ͍ͷͰ Singletonͷ࣮ʹ͑Δ…ʁ
©Fusic Co., Ltd. 31 ࠷৽ใΛऔಘ͢Δखஈ 4
©Fusic Co., Ltd. 32 PHPϚχϡΞϧʹॾʑॻ͔Ε͍ͯΔ ࠷ॳհͨ͠PHPϚχϡΞϧʹ Ҡߦͱ͍͏ܗͰ͕ࠩઆ໌͞Ε͍ͯΔ
©Fusic Co., Ltd. 33 ͕ɺ࠷৽ͷใө͖͠Ε͍ͯͳ͍… magic methodͰ࡞ͬͨ Closure ʹؔͯ͠આ໌Έͯ૾͕͖ͮΒ͘ αϯϓϧίʔυͳͲͳͯ͘
ͲͷΑ͏ͳͷ͔গ͠໎ͬͨ Closure ͷઆ໌magic methods ·ͰϚχϡΞϧΛಡΜͰݟ·͕ͨ͠ ·ͩө͞Ε͍ͯ·ͤΜͰͨ͠ ݁ՌChatGPTsΈ͍ͨͳ෦ ඍົͳ݁Ռʹ
©Fusic Co., Ltd. 34 ۩ମʹؔͯ͠ӳจͰGitHubΛݕࡧ͢Δͷ͕ૣ͍ php / php-srcͷGitHubʹ ఆͷαϯϓϧίʔυͳͲ͍ͬͯͨ ߏจͳͲ͕ཧղग़དྷͨΓ͠·ͨ͠
ࠓճ࣮Ұ൪ݸਓతʹֶͼʹͳͬͨͷ͕ PHPϚχϡΞϧͱ php/php-srcΛ ྆ํಡΉ͜ͱͰ͍ΖΜͳใΛ ͑ΔΑ͏ʹͳΓ·ͨ͠
©Fusic Co., Ltd. 35 RFC͕PHPϚχϡΞϧʹग़ͯͨΓ͠·͢ https://wiki.php.net/rfc
©Fusic Co., Ltd. 36 ࠓिͷPHP Ұ෦·ͱΊͯ͘Ε͍ͯΔํ(@hanhan1978)͕͍ΔͷͰษڧʹͳΓ·͢
©Fusic Co., Ltd. 37 ·ͱΊ 5
©Fusic Co., Ltd. 38 ·ͱΊ PHP8.32026·Ͱར༻͠·͢ɻ͔ͬ͠Γ͖߹͍·͠ΐ͏ Point 01 PHP 8.3.0
Release Announcementʹ͍ͬͯͳ͍ػೳ͋Γ·͢ Point 02 ใΛूΊΔखஈΛཱ֬͢Δ͜ͱͰɺ͞Βʹֶͼ͕͕Γ·͢ɻࣗͨͪͷใͷ͍ํΛݟ͚ͭ·͠ΐ͏ʂ Point 03
©Fusic Co., Ltd. 39 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠