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
Hiroyuki Mito
February 27, 2023
Programming
83
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
100
Paiza CloudとVS Codeで快適な環境を作ろう! / Let's create a comfortable development environment with Paiza Cloud and Visual Studio Code !
hiroyukimito
0
720
Ruby以外から始めるエンジニア生活 PHP(Laravel)版 / Let's start an engineer other than Ruby !! PHP ver.
hiroyukimito
0
480
Other Decks in Programming
See All in Programming
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
330
Family mrubyの進捗
kishima
1
130
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
480
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
330
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3.2k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
390
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
440
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
190
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
570
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
190
アクセシビリティから考える情報設計
high_g_engineer
0
390
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Language of Interfaces
destraynor
162
27k
Marketing to machines
jonoalderson
1
5.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Documentation Writing (for coders)
carmenintech
77
5.5k
New Earth Scene 8
popppiees
4
2.6k
Utilizing Notion as your number one productivity tool
mfonobong
4
600
Amusing Abliteration
ianozsvald
1
310
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
550
Bash Introduction
62gerente
615
220k
Raft: Consensus for Rubyists
vanstee
142
7.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による解析・補完が使⽤できる 実⾏時に宣⾔された型であることを確認する 読み込みに必要な時間を短縮できる