I want to get interface’s name into a string.
get_class function requires an object from the interface, and not the interface itself.
Theoretically, this example shows what I want to do:
<?php
interface MyInterface
{
/* Some code goes here */
}
$name = get_interface_name(MyInterface); # $name should hold string 'MyInterface'
?>
Thanks,
Ogail
Use the reflectionclass http://php.net/manual/en/reflectionclass.getinterfacenames.php