You are here : phpmathdechex

dechex() - math

Returns a string containing a hexadecimal representation of the given
   unsigned number argument.
Parameters :
  • number - The decimal value to convert. As PHP's integer type is signed, but dechex() deals with unsigned integers, negative integers will be treated as though they were unsigned.

  • Syntax

    string dechex
         ( int $number
        )


    Example

    <?phpecho dechex(10) . "\n";echo dechex(47);?>


    Output / Return Value


    Limitations


    Alternatives / See Also


    Reference