mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7e67366a9b
zend_class_implements_interface works fine if the "class" is an interface, so simply drop this assertion. This avoids the need to special case this situation.
19 lines
276 B
PHP
19 lines
276 B
PHP
--TEST--
|
|
Interface with __toString() method
|
|
--FILE--
|
|
<?php
|
|
|
|
interface MyStringable {
|
|
public function __toString(): string;
|
|
}
|
|
|
|
$rc = new ReflectionClass(MyStringable::class);
|
|
var_dump($rc->getInterfaceNames());
|
|
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
[0]=>
|
|
string(10) "Stringable"
|
|
}
|