Skip to content

Instantly share code, notes, and snippets.

@takikawa
Last active August 29, 2015 13:57
Show Gist options
  • Save takikawa/9676911 to your computer and use it in GitHub Desktop.
Save takikawa/9676911 to your computer and use it in GitHub Desktop.
<?hh
trait Foo {
abstract protected function foo() : int;
public function getVal(): int {
return $this->foo();
}
}
class MyClass {
use Foo;
public function foo() : string {
return "foo";
}
}
$foo = 1 + new MyClass().foo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment