array_pop would have the same effect on the session array that it has on any other array: it will remove the last item (whichever item that happens to be). If you remove an item from the session array it gets removed from the session (since the array is how you access the session). Once it's gone the second-to-last element is now the last so when you call array_pop again, that element will be removed.
You have two choices:
- Remove the element you want to remove by name explicitly (
unset($_SESSION['REQUEST']) if that is how the element is named). This will remove it from the session, but won't remove anything else.
- If you don't want to remove it from the session but just from the array on this particular occasion, copy the session array to a temporary one and use the temporary array.
It sounds like the first is more what you're after. It has the advantage of not just assuming that the element you want to remove is the last one.