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

Converts the given string in the given base to an int, assuming letters a-z are used for digits when $from_base > 10

namespace HH\Lib\Math;

function from_base(
  string $number,
  int $from_base,
): int;

To base convert an int into a string, see Math\to_base().


  • string $number
  • int $from_base