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
PHPDocを活用する
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hiroyuki Mito
February 27, 2023
Programming
86
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPDocを活用する
Hiroyuki Mito
February 27, 2023
More Decks by Hiroyuki Mito
See All by Hiroyuki Mito
見直したいテーブル設計
hiroyukimito
0
110
Paiza CloudとVS Codeで快適な環境を作ろう! / Let's create a comfortable development environment with Paiza Cloud and Visual Studio Code !
hiroyukimito
0
730
Ruby以外から始めるエンジニア生活 PHP(Laravel)版 / Let's start an engineer other than Ruby !! PHP ver.
hiroyukimito
0
480
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
ChromeでローカルLLM
ryu1013
0
140
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
すこし踏み込む CancellationToken
htkym
2
1.7k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Workers Cache を知る
syumai
0
360
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.4k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
How to Talk to Developers About Accessibility
jct
2
580
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Invisible Side of Design
smashingmag
301
52k
Code Reviewing Like a Champion
maltzj
529
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Docker and Python
trallard
47
4.2k
30 Presentation Tips
portentint
PRO
1
430
Documentation Writing (for coders)
carmenintech
77
5.6k
Transcript
PHPDocを活⽤する
よく⾒るあのコメント実は +こんなコメントを⾒たことありますよね +/* + * @param int $value + *
@return array $result + */ +public function getData($value) +{ + return $result +}
よく⾒るあの コメント実は PHPDocと呼び、将来の ⾃分⾃⾝や他の開発者に 向けて情報を残します。 意識せずに記述している ⽅も多いのではないで しょうか?
コメントは 増やすべき? 減らすべき? 個⼈の考えですが極⼒コメントは少 なくするべきだと考えています。 その上でわかりやすく必要な情報を 理解できるように補⾜するものとし てコメントを残すことを意識します。 ではどのようにするかと⾔うと PHPDocと呼ばれるDocブロックを
残します。
PHPで型宣⾔って必要? +近年、静的型付け⾔語が流⾏していますがその中で得られる メリットとして主に3点挙げられます。 1. コンパイル時のエラー発⾒ 2. メモリ最適化 3. パフォーマンスの向上
PHPで型宣⾔って必要? +動的型付け、静的型付けそれぞれにメリットがありますが、 PHPを使⽤するメリットを享受しながら、 1. 事前にエラーを発⾒する 2. 他の開発者に使⽤⽤途や意図を伝える +という2点のために私は習慣づけるようになりました。
PHPDocによるメリット IDEによる解析・補完が使⽤できる 実⾏時に宣⾔された型であることを確認する 読み込みに必要な時間を短縮できる