HH\Lib\Math\to_base

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

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

Converts the given non-negative number into the given base, using letters a-z for digits when $to_base > 10

Description

namespace HH\Lib\Math;

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

To base convert a string to an int, see Math\from_base().

Parameters

  • int $number
  • int $to_base