当前位置: 首页 > 网络学院 > 服务端脚本教程 > PHP > decoct() 函数
The decoct() function converts a decimal number to an octal number.
decoct()函数的作用是:将一个十进制数字转换为八进制。
decoct(dec_number) |
| Parameter参数 | Description描述 |
|---|---|
| dec_number | Required. Specifies the decimal number to convert 必要参数。指定需要执行转换的十进制数值对象 |
<?php
echo decoct("30") . "<br />";
echo decoct("10") . "<br />";
echo decoct("1587") . "<br />";
echo decoct("70");
?> |
The output of the code above will be:
上述代码将输出下面的结果:
36 12 3063 106 |
评论 (0) All