HH\Lib\Math\from_base

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

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

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

Description

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().

Parameters

  • string $number
  • int $from_base