3v4l.org

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