mirror of
https://github.com/php/php-src.git
synced 2026-04-01 13:12:16 +02:00
15 lines
227 B
PHP
Executable File
15 lines
227 B
PHP
Executable File
--TEST--
|
|
ReflectionClass::getConstant
|
|
--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)
|