php-src/ext/reflection/tests/021.phpt
2008-08-11 14:00:02 +00:00

17 lines
298 B
PHP
Executable File

--TEST--
ReflectionClass::hasConstant
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php
class Foo {
const c1 = 1;
}
$class = new ReflectionClass("Foo");
var_dump($class->hasConstant("c1"));
var_dump($class->hasConstant("c2"));
?>
--EXPECT--
bool(true)
bool(false)