<?hh
class Test
{
public function first(string $str): string
{
function nested() {
}
return $str;
}
public function second(int $i): int
{
return $i;
}
}
$t = new Test;
echo $t->first("42");
echo $t->second(42);
<?hh
class Test
{
public function first(string $str): string
{
function nested() {
}
return $str;
}
public function second(int $i): int
{
return $i;
}
}
$t = new Test;
echo $t->first("42");
echo $t->second(42);
Output for 8.0.13
Parse error: syntax error, unexpected token "class" in /in/9ALr7 on line 3
Process exited with code 255.