TypedValue* fg_apc_store(HPHP::VM::ActRec *ar) { TypedValue rv; int64_t count = ar->numArgs(); TypedValue* args UNUSED = ((TypedValue*)ar) - 1; if (count >= 2LL && count <= 4LL) { if ((count <= 3 || (args-3)->m_type == KindOfInt64) && (count <= 2 || (args-2)->m_type == KindOfInt64) && IS_STRING_TYPE((args-0)->m_type)) { rv._count = 0; rv.m_type = KindOfBoolean; rv.m_data.num = (fh_apc_store((Value*)(args-0), (args-1), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0))) ? 1LL : 0LL; frame_free_locals_no_this_inl(ar, 4); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } else { fg1_apc_store(&rv, ar, count); frame_free_locals_no_this_inl(ar, 4); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; } } else { throw_wrong_arguments_nr("apc_store", count, 2, 4, 1); } rv.m_data.num = 0LL; rv._count = 0; rv.m_type = KindOfNull; frame_free_locals_no_this_inl(ar, 4); memcpy(&ar->m_r, &rv, sizeof(TypedValue)); return &ar->m_r; return &ar->m_r; }
TypedValue * fg1_apc_store(TypedValue* rv, HPHP::VM::ActRec* ar, int64_t count) { TypedValue* args UNUSED = ((TypedValue*)ar) - 1; rv->m_type = KindOfBoolean; switch (count) { default: // count >= 4 if ((args-3)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-3); } case 3: if ((args-2)->m_type != KindOfInt64) { tvCastToInt64InPlace(args-2); } case 2: break; } if (!IS_STRING_TYPE((args-0)->m_type)) { tvCastToStringInPlace(args-0); } rv->m_data.num = (fh_apc_store((Value*)(args-0), (args-1), (count > 2) ? (long)(args[-2].m_data.num) : (long)(0), (count > 3) ? (long)(args[-3].m_data.num) : (long)(0))) ? 1LL : 0LL; return rv; }