original_string: public function getPid()
      {
          $options = static::getOptions();
          $debug = @$options['debug'] === true;
  
          $pidFile = $options['pid_file'];
          if (!$pidFile)
              throw new \Exception("No pid_file in the config");
  
          $fpPid = fopen($pidFile, "c");
          if (!$fpPid)
              throw new \Exception("Could not open " . $pidFile);
  
          if (!flock($fpPid, LOCK_EX | LOCK_NB)) {
              fclose($fpPid);
              return (int)file_get_contents($pidFile);
          }
  
          flock($fpPid, LOCK_UN);
          fclose($fpPid);
          @unlink($pidFile);
          return false;
      }
code: public function getPid()
      {
          $options = static::getOptions();
          $debug = @$options['debug'] === true;
  
          $pidFile = $options['pid_file'];
          if (!$pidFile)
              throw new \Exception("No pid_file in the config");
  
          $fpPid = fopen($pidFile, "c");
          if (!$fpPid)
              throw new \Exception("Could not open " . $pidFile);
  
          if (!flock($fpPid, LOCK_EX | LOCK_NB)) {
              fclose($fpPid);
              return (int)file_get_contents($pidFile);
          }
  
          flock($fpPid, LOCK_UN);
          fclose($fpPid);
          @unlink($pidFile);
          return false;
      }
code_tokens: public function getPid ( ) { $ options = static :: getOptions ( ) ; $ debug = @ $ options [ 'debug' ] === true ; $ pidFile = $ options [ 'pid_file' ] ; if ( ! $ pidFile ) throw new \ Exception ( "No pid_file in the config" ) ; $ fpPid = fopen ( $ pidFile , "c" ) ; if ( ! $ fpPid ) throw new \ Exception ( "Could not open " . $ pidFile ) ; if ( ! flock ( $ fpPid , LOCK_EX | LOCK_NB ) ) { fclose ( $ fpPid ) ; return ( int ) file_get_contents ( $ pidFile ) ; } flock ( $ fpPid , LOCK_UN ) ; fclose ( $ fpPid ) ; @ unlink ( $ pidFile ) ; return false ; }
docstring: Get daemon PID
  
  @return integer|false    Returns false if there is no daemon running
docstring_tokens: Get daemon PID