php-src/ext/reflection/tests/022.phpt
2012-10-10 10:27:49 +08:00

17 lines
294 B
PHP

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