Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
470
とにかく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
340
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
580
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
740
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
1.9k
いまあるチームにフィットさせる 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
AWS X-Rayを利用したサーバーレスのパフォーマンス分析 / Serverless performance analysis using AWS X-Ray
seike460
PRO
2
180
Other Decks in Programming
See All in Programming
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.3k
Thoughts and experiences on Rust and TypeScript
unvalley
2
220
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
640
.NET Conf 2024の振り返り
tomokusaba
0
200
AWS認定資格を勉強した先に何があったか
satoshi256kbyte
2
190
Jakarta EE meets AI
ivargrimstad
0
930
社内活動の取り組み紹介 ~ スリーシェイクでこんな取り組みしてます ~
bells17
0
390
我々のデザインシステムは Chakra v3 にアップデートします
shunya078
2
2.9k
Missing parts when designing and implementing Android UI
ericksli
0
390
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
150
useSyncExternalStoreを使いまくる
ssssota
2
380
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
590
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
31
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
We Have a Design System, Now What?
morganepeng
51
7.3k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Statistics for Hackers
jakevdp
796
220k
Music & Morning Musume
bryan
46
6.2k
Why Our Code Smells
bkeepers
PRO
334
57k
Visualization
eitanlees
145
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
1
110
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/
͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠