'Add a constant at the global or namelisted scope level.'

def addConstant(self, name, vartype='', doc=None):

    log.debug('CONSTANT:    %r    type:    %r    on    line    %d', name, vartype, self.lineno)
    toScope = (self.currentNamespace or self.fileinfo)
    phpConstant = toScope.constants.get(name)
    if (phpConstant is None):
        if (vartype and isinstance(vartype, (list, tuple))):
            vartype = '.'.join(vartype)
        toScope.constants[name] = PHPConstant(name, self.lineno, vartype)
