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
PHPDocを活用する
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hiroyuki Mito
February 27, 2023
Programming
0
77
PHPDocを活用する
Hiroyuki Mito
February 27, 2023
Tweet
Share
More Decks by Hiroyuki Mito
See All by Hiroyuki Mito
見直したいテーブル設計
hiroyukimito
0
96
Paiza CloudとVS Codeで快適な環境を作ろう! / Let's create a comfortable development environment with Paiza Cloud and Visual Studio Code !
hiroyukimito
0
680
Ruby以外から始めるエンジニア生活 PHP(Laravel)版 / Let's start an engineer other than Ruby !! PHP ver.
hiroyukimito
0
450
Other Decks in Programming
See All in Programming
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
170
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
1.1k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
250
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
230
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
310
How to stabilize UI tests using XCTest
akkeylab
0
140
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Codex の「自走力」を高める
yorifuji
0
1.3k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.1k
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
140
存在論的プログラミング: 時間と存在を記述する
koriym
5
500
安いハードウェアでVulkan
fadis
1
800
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
How to train your dragon (web standard)
notwaldorf
97
6.6k
How to Ace a Technical Interview
jacobian
281
24k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
93
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
110
Producing Creativity
orderedlist
PRO
348
40k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
490
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による解析・補完が使⽤できる 実⾏時に宣⾔された型であることを確認する 読み込みに必要な時間を短縮できる