PHP function documentation writing specifications require that the version description follows the format of v
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!