HH\Set::__toString

Description

public function __toString(): string

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

Return Values

  • string - The string "Set".

Examples

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

<?hh

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

$s = Set {1, 2, 3};
echo $s."\n";

$s2 = Set {'a', 'b', 'c'};
echo $s2."\n";

$s3 = Set {};
echo $s3."\n";
Output
Set
Set
Set