PHP Manualen
forrige |  | næste

# class_implements

(PHP 5)

class_implements -- Return the interfaces which are implemented by the given class

## Beskrivelse

array class_implements ( mixed class [, bool autoload] )

This function returns an array with the names of the interfaces that the given class implements.

## Parameterliste

class

  An object (class instance) or a string (class name).

## Returneringsværdier

Returns an array or `FALSE` on error.

## ChangeLog

Version | Beskrivelse
--- | ---
5.1.0 | Added the option to pass the parameter as a string

## Eksempler

Eksempel 1. class_implements() example

`<?php interface foo { } class bar implements foo {} print_r(class_implements(new bar)); ?>`

Ovenstående eksempel vil udskrive:

    Array
    (
        [foo] => foo
    )

## Se også

class_parents()

forrige | hjem | næste
SimpleXMLIterator::valid | op | class_parents