class Fifo {
  private $data = array();
  public function push($element){
    array_push($this->data, $element);
  }
  public function pop(){
    if ($this->isEmpty()){
      throw new Exception('Attempt to pop from an empty queue');
    }
    return array_shift($this->data);
  }

  
  public function enqueue($element) { $this->push($element); }
  public function dequeue() { return $this->pop(); }

  
  public function isEmpty(){
    return empty($this->data);
  }
}