Stack implementation fo PHP