mirror of
https://github.com/php/php-src.git
synced 2024-09-30 22:36:12 +00:00
15 lines
231 B
Plaintext
15 lines
231 B
Plaintext
|
--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)
|