HH\ImmMap::__toString

Description

public function __toString(): string

Returns the string version of the current ImmMap, which is "ImmMap".

Return Values

  • string - The string "ImmMap".

Examples

The string version of an ImmMap is always "ImmMap":

<?hh

namespace Hack\UserDocumentation\API\Examples\ImmMap\__toString;

$im = ImmMap {'a' => 1, 'b' => 2, 'c' => 3};
echo $im."\n";

$im3 = ImmMap {};
echo $im3."\n";
Output
ImmMap
ImmMap