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");
?>

定义和用法

hexdec() 函数把十六进制数转换为十进制数。

提示:如需把十进制转换为十六进制,请查看 dechex() 函数。

语法

hexdec(hex_string);

参数 描述
hex_string 必需。规定要转换的十六进制字符串。

技术细节

返回值: hex_string 的十进制值。
返回类型: Float / Integer
PHP 版本: 4+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Basics of Web Design

Basics of Web Design

Terry Felke-Morris / Addison-Wesley / 2013-1-28 / USD 98.40

Basics of Web Design: HTML5 and CSS3, 2e covers the basic concepts that web designers need to develop their skills: * Introductory Internet and Web concepts* Creating web pages with HTML5* Configurin......一起来看看 《Basics of Web Design》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器