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の最新機能 / Proper underst...
Search
shiro seike
PRO
June 22, 2024
Programming
2
390
有効な使い方を正しく理解して実装する PHP8.3の最新機能 / Proper understanding and implementation of effective usage Latest features in PHP 8.3
PHPカンファレンス福岡2024
https://phpcon.fukuoka.jp/2024/
shiro seike
PRO
June 22, 2024
Tweet
Share
More Decks by shiro seike
See All by shiro seike
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
89
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
510
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
1.1k
実践サーバーレスパフォーマンスチューニング ~その実力に迫る~ / Practical Serverless Performance Tuning ~A Close Look at its Power~
seike460
PRO
2
350
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
590
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
750
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
2.1k
いまあるチームにフィットさせる Serverless / Serverless fits in with the team you have now.
seike460
PRO
2
180
地方こそサーバーレス! チームにフィットさせるサーバーレス / Rural areas are serverless! Serverless to Fit Your Team
seike460
PRO
1
120
Other Decks in Programming
See All in Programming
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
350
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
270
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
200
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
ドメインイベント増えすぎ問題
h0r15h0
1
120
From Translations to Multi Dimension Entities
alexanderschranz
2
130
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
We Have a Design System, Now What?
morganepeng
51
7.3k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Being A Developer After 40
akosma
87
590k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Transcript
©Fusic Co., Ltd. 1 ༗ޮͳ͍ํΛਖ਼͘͠ཧղ࣮ͯ͢͠Δ PHP8.3ͷ࠷৽ػೳ 2024.06.22 @seike460 PHPΧϯϑΝϨϯεԬ2024
©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 ొஃ Nowʂ ࣗݾհ ͡Ίʹ גࣜձࣾFusic ϓϦϯγύϧΤϯδχΞ/ΤόϯδΣϦετ
©Fusic Co., Ltd. 3 CONTENTS ࣍ 1. PHP8.3ͷϦϦʔεʹ͍ͭͯৼΓฦΔ 2. PHP8.3ͷ৽ػೳϦετΞοϓ
3. ֤ػೳͷઆ໌ͱར༻ྫ 4. PHP8.4Λ͘ 5. ·ͱΊ
©Fusic Co., Ltd. 4 PHP8.3ͷϦϦʔεʹ͍ͭͯৼΓฦΔ 1
©Fusic Co., Ltd. 5 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ɹɹɹɹ ※PHP8.3.5ReleasePage͔Βআࡁ - 20244݄11 - PHP 8.3.7 - 20245݄9
©Fusic Co., Ltd. 6 PHP8.3.5…? PHP8.3.5͕ͳ͔ͬͨΜͰ͢ΑͶ ͬͯΛ@tadsanʹͨ͠Β ͋ͬͱ͍͏ؒʹௐͯ͘Ε·ͨ͠ʂ ▪ຊޠ༁ PHP
։ൃνʔϜPHP 8.3.6 ͷଈ࣌ϦϦʔεΛΞφϯε͠·͢ ͜ΕCVE-2024-1874 ʹ ରॲͨ͠ηΩϡϦςΟϦϦʔεͰ͢
©Fusic Co., Ltd. 7 PHP8.3ͷαϙʔτظݶ - Active Support - 202511݄23
ࠓ͔Β520 - Security Support - 202611݄23 ࠓ͔Β885
©Fusic Co., Ltd. 8 ͳͥ৽͍͠ػೳΛཧղ͢Δͷ͔ ਖ਼͘͠ػೳΛཧղ࣮ͯ͢͠ΔͱҎԼͷΑ͏ͳԸܙ͕ - ҆શੑͷ্ - όάͷࠞೖηΩϡϦςΟϗʔϧͷϦεΫͷݮʹܨ͕Δ
- ίʔυදݱྗͷ্ - ίʔυͷҙਤΛ໌֬ʹͯ͠ՄಡੑΛ্ͤ͞Δࣄ͕Մೳ - ։ൃޮͷ্ - ReadonlyϓϩύςΟAttributeͷ༻ʹΑΓόάൃੜͷ੍ ίʔυʹҙࢥΛຒΊࠐΜͰɺίʔυΛ௨͠ඇಉظίϛϡχέʔγϣϯ͕Մೳ ݴޠදݱ͕๛͔ʹ͢Δ͜ͱͰೝෛՙΛԼ͍͖͛ͯ·͠ΐ͏
©Fusic Co., Ltd. 9 ৽ػೳͷϦετΞοϓ 2
©Fusic Co., Ltd. 10 ৽ػೳͷϦετΞοϓ - ػೳͱͯ͠ͷՃ - Ϋϥεఆͷܕ͚ -
Ϋϥεఆͷจࣈྻࢦఆ - Attribute#[\Override]ͷՃ - ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯ - ίϚϯυϥΠϯLinterͷෳϑΝΠϧࢦఆ - ؔɺϝιουͷՃ - json_validate - Randomizer::getBytesFromString() - Randomizer::getFloat() - Randomizer::nextFloat() https://www.php.net/releases/8.3/ja.php
©Fusic Co., Ltd. 11 ৽ػೳͷϦετΞοϓ - ػೳͱͯ͠ͷՃ - Ϋϥεఆͷܕ͚ -
Ϋϥεఆͷจࣈྻࢦఆ - Attribute#[\Override]ͷՃ - ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯ https://www.php.net/releases/8.3/ja.php
©Fusic Co., Ltd. 12 ֤ػೳͷઆ໌ͱར༻ྫ 3
©Fusic Co., Ltd. 13 Ϋϥεఆͷܕ͚ ʲbeforeʳ
©Fusic Co., Ltd. 14 Ϋϥεఆͷܕ͚ ʲbeforeʳ CacheΫϥεʹ CacheConfigΫϥε͕ઃఆΛ͢ ֦ுͨ͠ઃఆΛͦ͏ͱͨ͠ࡍʹ ఆͷܕ͚Λߦ͍ͬͯͳ͍ͨΊ
ҙਤͤ͵ܕͷఆΛઃఆ όάͷൃੜΛڐ༰͢Δࣄʹ
©Fusic Co., Ltd. 15 Ϋϥεఆͷܕ͚ ʲafterʳ
©Fusic Co., Ltd. 16 Ϋϥεఆͷܕ͚ ʲafterʳ ܕΛࢦఆ͢Δࣄ͕Մೳʹ ܕͷෆҰகʹΑΔόάΛࢭ ίʔυͷ৴པੑ্ʹܨ͕Δ ܕ͕໌ࣔ͞Ε͍ͯΔͨΊɺ
ίʔυΛಡΉ։ൃऀ͕ҙਤΛ ཧղ͘͢͠ೝෛՙΛԼ͛Δࣄʹ
©Fusic Co., Ltd. 17 Ϋϥεఆͷจࣈྻࢦఆ ʲbeforeʳ
©Fusic Co., Ltd. 18 Ϋϥεఆͷจࣈྻࢦఆ ʲbeforeʳ ఆ໊Λจࣈྻͱͯ͠ߏங -> ఆΛࢀর͢ΔؔΛར༻ ؔʹଘࡏΛ͍ͬͯΔඞཁ͕͋Γɺ
ײతͰͳ͍ͷͰೝෛՙ͕͔͔Δ
©Fusic Co., Ltd. 19 Ϋϥεఆͷจࣈྻࢦఆ ʲafterʳ
©Fusic Co., Ltd. 20 Ϋϥεఆͷจࣈྻࢦఆ ʲafterʳ ఆΛจࣈྻࢦఆ͕Մೳʹ ͱͱҎԼ͕ग़དྷ͍ͯͨͷͰ ΑΓࣗવͳܗʹͳͬͨͱߟ͑·͢ -
มͷಈతࢀর - ΦϒδΣΫτϓϩύςΟͷಈతࢀর - ੩తϓϩύςΟͷಈతࢀর
©Fusic Co., Ltd. 21 Attribute#[\Override]ͷՃ ʲbeforeʳ
©Fusic Co., Ltd. 22 Attribute#[\Override]ͷՃ ʲbeforeʳ ϝιου໊ͷλΠϓϛεͳͲʹΑΓ ҙਤͨ͠ΦʔόʔϥΠυ͕ࣦഊ͠ɺ ҙਤ͠ͳ͍ಈ࡞ͱͳΔ͜ͱ͕͋Δ ࠨͷίʔυͷ߹ɺλΠϙʹΑΓ
CacheΫϥεΛ֦ுͯ͠ར༻͍͕ͨ͠ ଆͷBaseCacheͷsetCacheLifetime ͕࠾༻͞Εͯ͠·͍ɺόάͷݪҼʹ
©Fusic Co., Ltd. 23 Attribute#[\Override]ͷՃ ʲafterʳ
©Fusic Co., Ltd. 24 Attribute#[\Override]ͷՃ ʲafterʳ #[\Override]ͱ͍͏Attribute͕Ճ Classinterfaceʹಉ͡Method͕ ఆٛ͞Ε͍ͯͳ͍߹Τϥʔ͕ൃੜ ҾΓ͕ؒҧ͍ͬͯΔ߹
ݩͷϝιου͕มߋ͞Εͨ߹༗ޮ Fatal error: ExtendedCache::setCatLifetime() has #[\Override] attribute, but no matching parent method exists
©Fusic Co., Ltd. 25 ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯʲbeforeʳ
©Fusic Co., Ltd. 26 ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯʲbeforeʳ readonlyෆมੑΛอͭͨΊʹ ඇৗʹ༗༻ͳػೳ ࠨͷ߹ΫϥεΦϒδΣΫτੜ -> Ωϟογϡੜͱ͍͏ߟ͑
ઃఆΛҾ͖ܧ͙ҝclone͕ͨ͠ ݁ՌΩϟογϡੜ࣌ࠁҾ͖ܧ͗
©Fusic Co., Ltd. 27 ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯʲafterʳ
©Fusic Co., Ltd. 28 ಡΈऔΓઐ༻ϓϩύςΟͷσΟʔϓΫϩʔϯʲafterʳ cloneͷ࣌__cloneͰͷΈ ReadonlyϓϩύςΟॳظԽՄೳ Clone࣌ʹΩϟογϡੜ࣌ࠁΛ ࠶ॳظԽ͢Δ͜ͱͰ Cloneݩͱผ࣌ࠁʹ͢Δ͜ͱʹޭ
©Fusic Co., Ltd. 29 ͦͷଞͷมߋɺՃؔ͋Γ·͢ ϦϦʔεαΠτChangeLogΛνΣοΫ͠·͠ΐ͏ʂ
©Fusic Co., Ltd. 30 PHP8.4Λ͘ 4
©Fusic Co., Ltd. 31 ϓϩύςΟϑοΫ
©Fusic Co., Ltd. 32 ϓϩύςΟϑοΫ __get ϝιου ϓϩύςΟͷಡΈऔΓ࣌ʹݺͼग़͞ΕΔ __set ϝιου
ϓϩύςΟͷॻ͖ࠐΈ࣌ʹݺͼग़͞ΕΔ __isset ϝιου isset ؔ empty ؔͰ ϓϩύςΟͷଘࡏ֬ೝ࣌ʹݺͼग़͞ΕΔ
©Fusic Co., Ltd. 33 ͦͷଞʹਐΜͰ͍Δ࣮͕͋Γ·͢ https://wiki.php.net/rfc
©Fusic Co., Ltd. 34 ࠓिͷPHP Ұ෦·ͱΊͯ͘Ε͍ͯΔํ(@hanhan1978)͕͍ΔͷͰษڧʹͳΓ·͢
©Fusic Co., Ltd. 35 ΑΓޮతʹɺΑΓҙਤతʹίʔυΛॻͨ͘Ίʹ PHPͷ৽͍͠ػೳΛֶͼɺ࣮ʹऔΓೖΕΔ͜ͱ্࣭ʹܨ͕Γ·͢ ޮՌͦΕ͚ͩͰͳ͘ίʔυΛ௨ͨ͡දݱ͕͕Δ͜ͱͰ ಈ࡞Ҏ্ͷใୡ͕ՄೳʹͳΓνʔϜͰͷίʔσΟϯάޮ্͕ ৽͍͠ػೳΛ͍ͪૣ͘Γɺར༻͢Δ͜ͱະདྷͷࢿʹ
©Fusic Co., Ltd. 36 ·ͱΊ 5
©Fusic Co., Ltd. 37 ·ͱΊ PHP8.32026·Ͱར༻͠·͢ɻ͔ͬ͠Γ͖߹͍·͠ΐ͏ Point 01 ܕAttributeͰίʔυकΔͱ͍͏උ͕ਐΜͰ͓Γɺࣗͨͪʹͯඋ͢ΔࣄΛબͰ͖Δ Point
02 ࠓճՃ͞ΕͨؔҎ֎ͷͷ͋Γ·͢ʂͥͻChangeLogΛͬͯΈ·͠ΐ͏ʂ Point 03 ػೳͱͯ͠ɺίʔυӽ͠ͷҙࢥୡͷखஈͱͯ͠৽͍͠ػೳΛֶͿ͜ͱ༗༻ɺͥͻ͍·͠ΐ͏ Point 04
©Fusic Co., Ltd. 38 Thank You We are Hiring! https://recruit.fusic.co.jp/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠