3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class TestClass { private string username="Dell"; function getName():string{ return this->username; } } $t1=new TestClass(); echo $t1->getName();
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/ZcLdF on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<?hh class TestClass { private string username="Dell"; function getName():string{ return this->username; } } $t1=new TestClass(); echo $t1->getName();