← All docs

hexdec()

Converts a hexadecimal string to its decimal number.

hexdec()

function hexdec(string $hex_string): mixed

Converts a hexadecimal string to its decimal number.

Parameters:

  • $hex_string (string)

Returns: mixed

Availability

  • Compiled (AOT): supported by the Elephc code generator.
  • eval() (magician interpreter): not available inside eval’d code.

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how hexdec is implemented in the compiler, see the internals page.