Home > Backend Development > PHP Tutorial > How do you make function comments?

How do you make function comments?

WBOY
Release: 2016-09-15 11:30:54
Original
1146 people have browsed it

One is beautiful, the other is clear at a glance

Reply content:

One is beautiful, the other is clear at a glance

<code>/**
     * 获取分类商品列表
     * @param $shop_id 店铺id
     * @param $cate_id 分类id
     * @param $page    页码
     * @param $per_page 页数
     * @return mixed
     */</code>
Copy after login

This is automatically generated using phpstorm

First of all, comments are for people to understand at a glance, but they have nothing to do with aesthetics. . There are generally two types of comments, one is at the code line level and the other is at the method level. The method level generally requires document comments.

It is recommended to take a look at the PHP PSR code standard programming specification
https://github.com/hfcorriez/...

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template