get_declared_interfaces()函数返回所有已声明接口的数组。
get_declared_interfaces(void)
无效 -不需要参数
get_declared_interfaces()函数返回所有已声明接口的数组。
以下是一个例子-
<?php print_r(get_declared_interfaces()); ?>
输出结果
Array ( [0] => Traversable [1] => IteratorAggregate [2] => Iterator [3] => ArrayAccess [4] => Serializable [5] => Throwable [6] => DateTimeInterface [7] => Reflector [8] => RecursiveIterator [9] => OuterIterator [10] => Countable [11] => SeekableIterator [12] => SplObserver [13] => SplSubject [14] => SessionHandlerInterface [15] => SessionIdInterface [16] => SessionUpdateTimestampHandlerInterface [17] => JsonSerializable )