PHP hexdec() 関数

❮ PHP Math リファレンス

16進数を10進数に変換します:

<?php
echo hexdec("1e") . "<br>";
echo hexdec("a") . "<br>";
echo hexdec("11ff") . "<br>";
echo hexdec("cceeff");
?>
例の実行 »

定義と用法

hexdec() 関数は、16進数を10進数に変換します。

チップ: 10進数を16進数に変換するには、 dechex() 関数を見てください。


構文

hexdec(hex_string);

パラメータ 説明
hex_string 必須。変換する16進数を指定する

技術内容
返り値: hex_stringの10進数値
返り値の型: Float / Integer
PHP バージョン: 4+

❮ PHP Math リファレンス