static function evalConstant ($exp, &$valid = null)
  {
    $exp = trim ($exp);
    if ($exp !== '') {
      $valid = true;
      if ($exp[0] == '"' || $exp[0] == "'") return substr ($exp, 1, -1);
      if (is_numeric ($exp)) {
        return ctype_digit ($exp) ? intval ($exp) : floatVal ($exp);
      }
      if (defined ($exp))
        return constant ($exp);
    }
    $valid = false;
    return null;
  }