(PHP 5, PHP 7, PHP 8)
ReflectionClass::getInterfaces — Arayüzleri döndürür
Bu işlevin bağımsız değişkeni yoktur.
Anahtarların arayüz isimlerini, değerlerin ise ReflectionClass nesnelerini içerdiği bir dizi döner.
Örnek 1 - ReflectionClass::getInterfaces() örneği
<?php
interface Foo { }
interface Bar { }
class Baz implements Foo, Bar { }
$rc1 = new ReflectionClass("Baz");
print_r($rc1->getInterfaces());
?>Yukarıdaki örnek şuna benzer bir çıktı üretir:
Array
(
[Foo] => ReflectionClass Object
(
[name] => Foo
)
[Bar] => ReflectionClass Object
(
[name] => Bar
)
)