mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
17 lines
294 B
Plaintext
17 lines
294 B
Plaintext
|
--TEST--
|
||
|
ReflectionClass::getConstant
|
||
|
--SKIPIF--
|
||
|
<?php extension_loaded('reflection') or die('skip'); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class Foo {
|
||
|
const c1 = 1;
|
||
|
}
|
||
|
$class = new ReflectionClass("Foo");
|
||
|
var_dump($class->getConstant("c1"));
|
||
|
var_dump($class->getConstant("c2"));
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
int(1)
|
||
|
bool(false)
|