3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface UserProviderInterface { public function supportsClass($class); } final class UserProvider implements UserProviderInterface { public function supportsClass($class): bool { return $class === self::class || is_subclass_of($class, self::class); } } echo (new UserProvider())->supportsClass('');
based on vVasO
Output for hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.2.6
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/l86ir on line 10
Process exited with code 255.