mirror of
https://github.com/php/php-src.git
synced 2025-01-10 21:14:37 +08:00
26 lines
609 B
Plaintext
26 lines
609 B
Plaintext
|
--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)
|