/// <summary> /// Performs exclusive or operation. /// </summary> internal static PhpValue BitXor(ref PhpValue x, ref PhpValue y) { var bx = x.ToBytesOrNull(); if (bx != null) { var by = y.ToBytesOrNull(); if (by != null) { return PhpValue.Create(new PhpString(BitXor(bx, by))); } } // return PhpValue.Create(x.ToLong() ^ y.ToLong()); }
/// <summary> /// Performs bitwise or operation. /// </summary> internal static PhpValue BitOr(ref PhpValue x, ref PhpValue y) { var bx = x.ToBytesOrNull(); if (bx != null) { var by = y.ToBytesOrNull(); if (by != null) { throw new NotImplementedException(); } } // return PhpValue.Create(x.ToLong() | y.ToLong()); }