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