(PHP 5 >= 5.2.0, PHP 7)
ReflectionClass::getInterfaceNames — Gets the interface names
public ReflectionClass::getInterfaceNames ( ) : array
Get the interface names.
This function has no parameters.
A numerical array with interface names as the values.
Example #1 ReflectionClass::getInterfaceNames() example
<?php interface Foo { } interface Bar { } class Baz implements Foo, Bar { } $rc1 = new ReflectionClass("Baz"); print_r($rc1->getInterfaceNames()); ?>
The above example will output something similar to:
Array ( [0] => Foo [1] => Bar )
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/reflectionclass.getinterfacenames.php