This API is part of the Hack Standard Library, not HHVM itself.

Converts the given string in base $from_base to base $to_base, assuming letters a-z are used for digits for bases greater than 10

namespace HH\Lib\Math;

function base_convert(
  string $value,
  int $from_base,
  int $to_base,
): string;

The conversion is done to arbitrary precision.


  • string $value
  • int $from_base
  • int $to_base