code: private static function findProcessIdFromLsofOutput(array $output)
      {
          foreach ($output as $line) {
              if (substr_compare($line, 'p', 0, 1) === 0) {
                  return intval(substr($line, 1));
              }
          }
      }
docs: @param array $output
  
  @return int|null