code: public static function getListeningProcessId($socketAddress)
      {
          if (!self::isLocalAddress($socketAddress)) {
              return;
          }
          $lsofPath = self::findLsof();
          $unix = self::isUnixAddress($socketAddress);
          $lsofArgs = self::buildLsofArgs($socketAddress, $unix);
          exec(escapeshellarg($lsofPath).' '.$lsofArgs.' 2>/dev/null', $output, $exitCode);
          if ($exitCode !== 0 || $output === null) {
              return;
          }
          if ($unix) {
              return self::findProcessIdFromLsofOutput($output);
          } else {
              return self::findListeningProcessIdFromLsofOutput($output);
          }
      }
docs: @param string $socketAddress
  
  @throws Exception\RuntimeException
  
  @return int|null