3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace NSP { class A {} } namespace NSP1 { use NSP; use NSP\A as ALIAS; interface WithoutReturn { function a(); } interface WithReturn { function a(): NSP\A; } interface WithReturnAlias { function a(): ALIAS; } interface WithReturnCase { function a(): NSP\a; } class Valid { function a(): NSP\A { } } class Invalid { function a(): int { } } class WithoutReturnClass { function a() { } } class C extends Valid implements WithReturnAlias {} }
Output for hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/hbAjv on line 14
Process exited with code 255.