ArrayData* EmptyArray::SetWithRefInt(ArrayData* ad, int64_t k, TypedValue v) { if (checkHACRefBind() && tvIsReferenced(v)) { raiseHackArrCompatRefBind(k); } auto const lval = LvalIntImpl<false>(ad, k, ad->cowCheck()); tvSetWithRef(v, lval); return lval.arr; }
ArrayData* GlobalsArray::SetWithRefStr(ArrayData* ad, StringData* k, TypedValue v, bool) { auto a = asGlobals(ad); tvSetWithRef(v, *a->m_tab->lookupAdd(k)); return a; }