__toString
Note
This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information.
Returns the string version of the current ImmVector, which is
"ImmVector"
public function __toString(): string;
Returns
string- Thestring"ImmVector".
Examples
The string version of a Vector is always "Vector":
$v = Vector {1, 2, 3};
echo $v->__toString()."\n";
$v2 = Vector {'a', 'b', 'c'};
echo $v2->__toString()."\n";
$v3 = Vector {};
echo $v3->__toString()."\n";