Couldn't we have an invalid path that would trigger more pop than the array contains ? 
In this case array_pop would generate a warning