dechex
(PHP 4, PHP 5)
dechex — 10 進数を 16 進数に変換する
説明
string dechex
( int $number
)
引数 number を 16 進数表現した文字列を返します。 変換できる最大の数字は 4294967295 であり、16 進数で表すと "ffffffff" です。
パラメータ
- number
-
変換したい 10 進数値。
返り値
number を 16 進文字列で表した値を返します。
例
Example#1 dechex() の例
<?php
echo dechex(10) . "\n";
echo dechex(47);
?>
上の例の出力は以下となります。
a 2f