ReflectionClass::hasConstant
检查常量是否已经定义
&reftitle.description;
public boolReflectionClass::hasConstant
stringname
检查类中是否已经定义了指定的常量。
&reftitle.parameters;
name
要被检查的常量名称。
&reftitle.returnvalues;
如果已定义返回 &true;,否则返回 &false;。
&reftitle.examples;
ReflectionClass::hasConstant 示例
hasConstant("c1"));
var_dump($class->hasConstant("c2"));
?>
]]>
&example.outputs.similar;
&reftitle.seealso;
ReflectionClass::hasMethod
ReflectionClass::hasProperty