class_implements

Supported Versions: PHP 5, PHP 7, PHP 8
Return the interfaces which are implemented by the given class or interface
<?php class_implements(object|string $object_or_class, bool $autoload = true): array|false
<?php             if (! class_exists($cast)) continue;



            if (

                in_array(CastsAttributes::class, class_implements($cast))

                && isset($attributes[$key])

                ) {

                $attributes[$key] = $model->getAttributes()[$key];