php-src/ext/reflection/tests/021.phpt
2020-02-03 22:52:20 +01:00

15 lines
233 B
PHP

--TEST--
ReflectionClass::hasConstant
--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)