/// <summary> /// Tries to get a global constant from current context. /// </summary> public bool TryGetConstant(string name, out PhpValue value) { int idx = 0; value = _constants.GetConstant(name, ref idx); return(value.IsSet); }
/// <summary> /// Tries to get a global constant from current context. /// </summary> internal bool TryGetConstant(string name, out PhpValue value, ref int idx) { value = _constants.GetConstant(name, ref idx); return(value.IsSet); }
/// <summary> /// Gets a constant value. /// </summary> public PhpValue GetConstant(string name, ref int idx) { return(_constants.GetConstant(name, ref idx)); // TODO: check the constant is valid (PhpValue.IsSet) otherwise Warning: undefined constant }