3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class Text { protected $text; public function __construct($text) { $this->text = $text; } public function hello() : int { return $this->text; } } var_dump((new Text(1))->hello());
Output for hhvm-3.10.0 - 3.12.0
int(1)
Output for 5.3.0 - 5.4.32
<?hh class Text { protected $text; public function __construct($text) { $this->text = $text; } public function hello() : int { return $this->text; } } var_dump((new Text(1))->hello());