3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class A { public function getNameStr(string $name): string { echo $name; } public function getNameInt(int $name): int { echo $name; } } $a = new A(); $a->getNameStr('Agop'); $a->getNameInt(1);
based on P6ubs
Output for 5.4.0 - 5.4.32
<?hh class A { public function getNameStr(string $name): string { echo $name; } public function getNameInt(int $name): int { echo $name; } } $a = new A(); $a->getNameStr('Agop'); $a->getNameInt(1);