TECH I.S.

PHP dechex()関数

❮ PHP Mathリファレンス

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

<?php echo dechex("30") . "<br>"; echo dechex("10") . "<br>"; echo dechex("1587") . "<br>"; echo dechex("70"); ?>


定義と使用法

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

ヒント:16進数を10進数に変換するには、hexdec()関数 を使用します。


構文

<div>dechex(<em>number</em>);</div>

パラメータ値

パラメータ

説明

number Required 変換する10進数値を指定します

Technical Details

Return Value: 10進数値の16進数を含む文字列
Return Type: string

PHP バージョン:

4+

❮ PHP Mathリファレンス