3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace test { class a { static function test () : string { return "abc"; } } } namespace bla { use test\a; class B { function test () : string { return a::test(); } } $b = new B(); var_dump($b->test()); }
based on kNBXZ
Output for 7.0.0 - 7.2.0
string(3) "abc"
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/cudXd on line 4
Process exited with code 255.