public static function isValidName($name, $strict = false)
    {
        $constants = self::getEnum();

        if ($strict) {
            return array_key_exists($name, $constants);
        }

        $keys = array_map('strtolower', array_keys($constants));

        return in_array(strtolower($name), $keys, true);
    }
public static function isValidName($name, $strict = false)
    {
        $constants = self::getEnum();

        if ($strict) {
            return array_key_exists($name, $constants);
        }

        $keys = array_map('strtolower', array_keys($constants));

        return in_array(strtolower($name), $keys, true);
    }
public static function isValidName ( $ name , $ strict = false ) { $ constants = self :: getEnum ( ) ; if ( $ strict ) { return array_key_exists ( $ name , $ constants ) ; } $ keys = array_map ( 'strtolower' , array_keys ( $ constants ) ) ; return in_array ( strtolower ( $ name ) , $ keys , true ) ; }
Checks whether a constant is valid.

@param string $name   name of the constant
@param bool   $strict whether to make a case sensitive check

@return bool the result of the test
Checks whether a constant is valid .