original_string: public function del($fd, $flag)
      {
          switch ($flag) {
              case EventInterface::EV_READ:
                  return $this->removeReadStream($fd);
              case EventInterface::EV_WRITE:
                  return $this->removeWriteStream($fd);
              case EventInterface::EV_SIGNAL:
                  return $this->removeSignal($fd);
              case EventInterface::EV_TIMER:
              case EventInterface::EV_TIMER_ONCE;
                  if (isset($this->_timerIdMap[$fd])){
                      $timer_obj = $this->_timerIdMap[$fd];
                      unset($this->_timerIdMap[$fd]);
                      $this->cancelTimer($timer_obj);
                      return true;
                  }
          }
          return false;
      }
code: public function del($fd, $flag)
      {
          switch ($flag) {
              case EventInterface::EV_READ:
                  return $this->removeReadStream($fd);
              case EventInterface::EV_WRITE:
                  return $this->removeWriteStream($fd);
              case EventInterface::EV_SIGNAL:
                  return $this->removeSignal($fd);
              case EventInterface::EV_TIMER:
              case EventInterface::EV_TIMER_ONCE;
                  if (isset($this->_timerIdMap[$fd])){
                      $timer_obj = $this->_timerIdMap[$fd];
                      unset($this->_timerIdMap[$fd]);
                      $this->cancelTimer($timer_obj);
                      return true;
                  }
          }
          return false;
      }
code_tokens: public function del ( $ fd , $ flag ) { switch ( $ flag ) { case EventInterface :: EV_READ : return $ this -> removeReadStream ( $ fd ) ; case EventInterface :: EV_WRITE : return $ this -> removeWriteStream ( $ fd ) ; case EventInterface :: EV_SIGNAL : return $ this -> removeSignal ( $ fd ) ; case EventInterface :: EV_TIMER : case EventInterface :: EV_TIMER_ONCE ; if ( isset ( $ this -> _timerIdMap [ $ fd ] ) ) { $ timer_obj = $ this -> _timerIdMap [ $ fd ] ; unset ( $ this -> _timerIdMap [ $ fd ] ) ; $ this -> cancelTimer ( $ timer_obj ) ; return true ; } } return false ; }
docstring: Remove event listener from event loop.
  
  @param mixed $fd
  @param int   $flag
  @return bool
docstring_tokens: Remove event listener from event loop .