mirror of
https://github.com/php/php-src.git
synced 2024-10-21 08:22:42 +00:00
17 lines
298 B
Plaintext
17 lines
298 B
Plaintext
|
--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)
|