HH\Lib\Str\to_int

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

This function is available as Str\to_int() in Facebook's www repository.

Returns the given string as an integer, or null if the string isn't numeric

Description

namespace HH\Lib\Str;

function to_int(
  string $string,
): ?int;

Parameters

  • string $string