Exemplo n.º 1
0
        internal bool DefineConstant(string name, PhpValue value, ref int idx, bool ignorecase = false)
        {
            var success = ConstsMap.DefineConstant(ref _constants, name, value, ref idx, ignorecase);

            if (success == false)
            {
                PhpException.Throw(PhpError.Notice, string.Format(Resources.ErrResources.constant_redefined, name));
            }
            return(success);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Defines a runtime constant.
 /// </summary>
 public bool DefineConstant(string name, PhpValue value, bool ignorecase = false) => _constants.DefineConstant(name, value, ignorecase);
Exemplo n.º 3
0
 internal bool DefineConstant(string name, PhpValue value, ref int idx, bool ignorecase = false) => ConstsMap.DefineConstant(ref _constants, name, value, ref idx, ignorecase);