xref: /PHP-7.1/ext/reflection/tests/021.phpt (revision 7af945e2)
1--TEST--
2ReflectionClass::hasConstant
3--SKIPIF--
4<?php extension_loaded('reflection') or die('skip'); ?>
5--FILE--
6<?php
7class Foo {
8	const c1 = 1;
9}
10$class = new ReflectionClass("Foo");
11var_dump($class->hasConstant("c1"));
12var_dump($class->hasConstant("c2"));
13?>
14--EXPECT--
15bool(true)
16bool(false)
17