implementation deque with php