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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hiroyuki Mito
February 27, 2023
Programming
0
75
PHPDocを活用する
Hiroyuki Mito
February 27, 2023
Tweet
Share
More Decks by Hiroyuki Mito
See All by Hiroyuki Mito
見直したいテーブル設計
hiroyukimito
0
95
Paiza CloudとVS Codeで快適な環境を作ろう! / Let's create a comfortable development environment with Paiza Cloud and Visual Studio Code !
hiroyukimito
0
670
Ruby以外から始めるエンジニア生活 PHP(Laravel)版 / Let's start an engineer other than Ruby !! PHP ver.
hiroyukimito
0
450
Other Decks in Programming
See All in Programming
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.4k
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
240
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
160
AHC061解説
shun_pi
0
310
TipKitTips
ktcryomm
0
150
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
290
atmaCup #23でAIコーディングを活用した話
ml_bear
4
730
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
160
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
210
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
410
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
220
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
510
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
73
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Google's AI Overviews - The New Search
badams
0
930
The Curious Case for Waylosing
cassininazir
0
260
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Fireside Chat
paigeccino
42
3.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.7k
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による解析・補完が使⽤できる 実⾏時に宣⾔された型であることを確認する 読み込みに必要な時間を短縮できる