HH\Map::__toString

Description

public function __toString(): string

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

Return Values

  • string - The string "Map".

Examples

The string version of a Map is always "Map":

<?hh

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

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

$m3 = Map {};
echo $m3."\n";
Output
Map
Map