3v4l.org

run code in 300+ PHP versions simultaneously
<?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('');

preferences:
121.72 ms | 404 KiB | 5 Q