3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait T { public function returnSelf() : self { return $this; } } class A { use T; } (new A)->returnSelf();
Output for hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.0rc6
Output for 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/IWT3r on line 4
Process exited with code 255.