HH\Pair::__toString

Returns the string version of the current Pair, which is "Pair"

Description

public function __toString(): string;

Return Values

  • string - The string "Pair".

Examples

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

<?hh

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

$p = Pair {-1, 5};
echo $p."\n";

$p2 = Pair {'foo', 'bar'};
echo $p2."\n";
Output
Pair
Pair