mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
26 lines
609 B
PHP
26 lines
609 B
PHP
--TEST--
|
|
ReflectionClass::isInterface() method
|
|
--CREDITS--
|
|
Felix De Vliegher <felix.devliegher@gmail.com>
|
|
#testfest roosendaal on 2008-05-10
|
|
--FILE--
|
|
<?php
|
|
|
|
interface TestInterface {}
|
|
class TestClass {}
|
|
interface DerivedInterface extends TestInterface {}
|
|
|
|
$reflectionClass = new ReflectionClass('TestInterface');
|
|
$reflectionClass2 = new ReflectionClass('TestClass');
|
|
$reflectionClass3 = new ReflectionClass('DerivedInterface');
|
|
|
|
var_dump($reflectionClass->isInterface());
|
|
var_dump($reflectionClass2->isInterface());
|
|
var_dump($reflectionClass3->isInterface());
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(false)
|
|
bool(true)
|