Home  >  Article  >  Backend Development  >  What are the requirements for describing function versions in the PHP function documentation specification?

What are the requirements for describing function versions in the PHP function documentation specification?

WBOY
WBOYOriginal
2024-04-27 08:54:01880browse

PHP function documentation writing specifications require that the version description follows the format of va2794938ce19851585bca9dcb25abc7e.2056f735454f755cdb8d3c8f5399296b.b098de6964fc97148881c66c365f9a7e, where the major version number represents major changes and the minor version number represents minor changes. To change, the release number represents a maintenance update.

PHP 函数文档编写规范中对函数版本的描述要求是什么?

PHP function documentation writing specification - function version description

In the PHP function documentation writing specification, the description of the function version has the following requirements:

Format:

版本 v<主版本号>.<次版本号>.<发行版本号>

Major version number:

Represents major incompatible changes to the function.

Minor version number:

represents minor changes to the function, such as the addition of new features.

Release version number:

represents maintenance updates of functions, such as bug fixes.

Example:

版本 v7.4.12

Actual case:

The following is a sample function document that contains a version description:

/**
 * 计算两个数的和
 *
 * @param int $num1 第一个数
 * @param int $num2 第二个数
 * @return int 两个数的和
 *
 * @version v8.1.0
 */
function sum(int $num1, int $num2): int
{
    return $num1 + $num2;
}

In the example above, the sum function is currently in version v8.1.0.

The above is the detailed content of What are the requirements for describing function versions in the PHP function documentation specification?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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