1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files

17 lines
401 B
PHP

--TEST--
ReflectionClass::getConstant
--FILE--
<?php
class Foo {
const c1 = 1;
}
$class = new ReflectionClass("Foo");
var_dump($class->getConstant("c1"));
var_dump($class->getConstant("c2"));
?>
--EXPECTF--
int(1)
Deprecated: ReflectionClass::getConstant() for a non-existent constant is deprecated, use ReflectionClass::hasConstant() to check if the constant exists in %s on line %d
bool(false)