PHP hexdec() 函数
PHP 教程
· 2019-01-26 22:42:05
实例
把十六进制转换为十进制:
<?php
echo hexdec("1e") . "<br>";
echo hexdec("a") . "<br>";
echo hexdec("11ff") . "<br>";
echo hexdec("cceeff");
?>
echo hexdec("1e") . "<br>";
echo hexdec("a") . "<br>";
echo hexdec("11ff") . "<br>";
echo hexdec("cceeff");
?>
定义和用法
hexdec() 函数把十六进制数转换为十进制数。
提示:如需把十进制转换为十六进制,请查看 dechex() 函数。
语法
hexdec(hex_string);
| 参数 | 描述 |
|---|---|
| hex_string | 必需。规定要转换的十六进制字符串。 |
技术细节
| 返回值: | hex_string 的十进制值。 |
|---|---|
| 返回类型: | Float / Integer |
| PHP 版本: | 4+ |
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Practical Algorithms for Programmers
Andrew Binstock、John Rex / Addison-Wesley Professional / 1995-06-29 / USD 39.99
Most algorithm books today are either academic textbooks or rehashes of the same tired set of algorithms. Practical Algorithms for Programmers is the first book to give complete code implementations o......一起来看看 《Practical Algorithms for Programmers》 这本书的介绍吧!