Y-KANOH
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
1
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
PHPerのための「PHPDoc について語り合う」PHP TechCafe ================================================== # PHPers News - [Microsoft、IE(Internet Explorer)サポート終了は2022年6月15日](https://www.itmedia.co.jp/news/articles/2105/20/news047.html) - [Google Cloud FunctionsがPHPをサポート開始。PHPでサーバレスの関数が記述可能に](https://www.publickey1.jp/blog/21/google_cloud_functionsphpphp.html) - [さよならPHP、WindowsでのPHPのサポートが「2022年11月28日」に完全終了](https://www.atmarkit.co.jp/ait/articles/2101/29/news010.html) - [PHP_CodeSniffer がPHP8対応](https://www.google.com/url?q=https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.6.0&sa=D&source=editors&ust=1621308923347000&usg=AFQjCNHAxsrrZiVXwr8QPyPahNS902KXlQ) - [php-src で CLion を使用](https://dev.to/ramsey/using-clion-with-php-src-4me0) - [PHPのソート処理のベンチマークライブラリ](https://www.google.com/url?q=https://www.phpclasses.org/package/12046-PHP-Benchmark-sorting-arrays-with-different-algorithms.html&sa=D&source=editors&ust=1621308932348000&usg=AFQjCNGLA6YTSHuIce97RgZKbtXzqlIZIA) - [PHP7.4 の FFIを試した](https://qiita.com/nishimura/items/70a8ee420cb4cbb1e251) - [PHPの人気フレームワークはやはりLaravelらしい](https://raku-noma.site/2020/04/10/%E3%80%902020%E5%B9%B4%E7%89%88%E3%80%91laravel%E3%81%8C%E3%83%80%E3%83%B3%E3%83%88%E3%83%84%EF%BC%9Fphp%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF5%E9%81%B8%E3%82%92%E7%8F%BE/) - [WordPressコミュニティーでグーグル提案の「FLoC」への対応が議論に](https://www.google.com/url?q=https://japan.zdnet.com/article/35169614/&sa=D&source=editors&ust=1621308948004000&usg=AFQjCNG9e_qleY51UaGrq_n-dYgNjDntAg) - [PHP8.0の新機能](https://qiita.com/rana_kualu/items/fe7998fbe773544d5d25) - [【PHP8.1】PHPで簡単に非同期処理を書けるようになる](https://www.google.com/url?q=https://qiita.com/rana_kualu/items/6247441f6fdd63c10a06&sa=D&source=editors&ust=1621308960831000&usg=AFQjCNFasToaZADSk0sQTg5sD278L5w4rg) - [PHP RFC: Enumerations](https://wiki.php.net/rfc/enumerations) - [laravelのヤバい脆弱性をついたkinsing(kdevtmpfsi)というマルウェアに感染した話 CVE-2021-3129](https://qiita.com/reopa_sharkun/items/f3819b2e8727728da82a) - [【PHP8.1】PHPで簡単に非同期処理を書けるようになる](https://qiita.com/rana_kualu/items/6247441f6fdd63c10a06) - [PhpStorm でペアプロが捗る共同編集機能使ってみた(Code With Me!)](https://qiita.com/yamotuki/items/a90710b6529409be0f9a) - [PHP重鎮の廣川類氏のコラム「PHPの最新状況:PHP 8.1開発スタート(第16回)」を公開しました。](https://column.prime-strategy.co.jp/archives/column_4278) - [【速報】サーバ 1 台で 10,000 rps も夢じゃない? Laravel Octane 1.0 リリース](https://zenn.dev/yamayuski/articles/c4a5e00bc291f1) - [PHPの公式Gitサーバーにハッキング被害--バックドアを仕掛けるコードが見つかる](https://japan.zdnet.com/article/35168549/) - [Laravel Octane v1.0 is Here](https://laravel-news.com/laravel-octane-1-0-0?utm_medium=email&utm_campaign=Laravel%20Octane%20v10%20Tailwind%20Configuration%20Viewer%20and%20more%20-%20359&utm_content=Laravel%20Octane%20v10%20Tailwind%20Configuration%20Viewer%20and%20more%20-%20359+CID_1b84d68d767d9181c62bcc95160504e9&utm_source=email%20marketing&utm_term=Laravel%20Octane) - [PHP 8 で導入される Attributes 事始め](https://qiita.com/il-m-yamagishi/items/73fc75fb42879d1353d8) - [A pair of malicious commits were made in the PHP source code repository over the weekend.](https://twitter.com/official_php/status/1377339882645905408) - [FaviconにPHPベースのWebシェルを仕込む手口、発見](https://news.mynavi.jp/article/20210517-1889140/) - [【PHP8.0】非厳密な比較演算子`==`の挙動が今さら変更になる](https://qiita.com/rana_kualu/items/82cc8295d2102d14b88a) ----------------------- # PHPDoc ## 参考資料 https://tech-blog.rakus.co.jp/entry/20210326/php ## PHPDocとは * 以下ようなブロックの説明としてコード内に残すコメントのこと * 関数 * 定数 * クラス * メソッド * プロパティ * etc... * 基本的にはただのコメント(:プログラムに影響はしない) * 一部のツールではPHPDocの内容によって処理を行うものも * 今後はPHP8で導入された[アトリビュート](https://www.php.net/releases/8.0/en.php#attributes)に置き換わると思われる ## 活用例 * 編集者の理解が捗る * IDEで補完が効きやすくなる * 静的解析がより正確に実行できる * 実行時に型チェックされる * 予期しない値が渡されることを防げる ## 記述ルール * 明確なルールは**決まっていない** * 各ツールごとに対応していない記述方式もある * PHPのドキュメントジェネレータであるphpDocumentorの記述がデファクトスタンダード? * PSR-5 や PSR-19 で標準化の議論は行われていた(2021/05現在 ドラフト状態) * 参考:[PSR](https://www.php-fig.org/psr/) ## 代表的な書き方 ### 基本的なタグ `@`から始まる文字列。何についてのドキュメントかを示す。 * @param:関数またはメソッドの引数について記述 * @return:返り値について記述 * @throws:例外について記述 * @var:変数について記述 * @todo:開発でやるべきことがあることを示す ### 型の記述 前述の タグ の後に記述することで、対象の型を記述する 例 ```php @return int 整数を返す ``` * リテラル型 * int, bool, string etc... * 配列型 * ただの配列(中身不明): array * 数値キーの配列: int[] * 複数の方があり得る配列: (int|string)[] * 文字列キーの配列: array<string, int> * キーごとに値の型が異なる配列: array{id: int, name: string} ### その他の書き方 #### false型 booleanではなくfalse型 #### property __get(), __set()を使った動的なプロパティを記述することが可能 #### ローカル変数の型指定 @var で指定

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully