mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
15 lines
233 B
PHP
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)
|