public function next($t) { if ($t !== NULL) { array_push($this->front, $t); } return empty($this->back) ? NULL : array_pop($this->back); }