HH\ImmVector::__toString

Description

public function __toString(): string

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

Return Values

  • string - The string "ImmVector".

Examples

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

<?hh

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

$v = Vector {1, 2, 3};
echo $v."\n";

$v2 = Vector {'a', 'b', 'c'};
echo $v2."\n";

$v3 = Vector {};
echo $v3."\n";
Output
Vector
Vector
Vector