HH\Lib\Math\base_convert

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

This function is available as Math\base_convert() in Facebook's www repository.

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

Description

namespace HH\Lib\Math;

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

The conversion is done to arbitrary precision.

Parameters

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