Internal/IdentificationHelper.php
private static function findListeningProcessIdFromLsofOutput(array $output)
    {
        $pid = null;
        foreach ($output as $line) {
            if (substr_compare($line, 'p', 0, 1) === 0) {
                $pid = intval(substr($line, 1));
            }
            $record = explode("\0", $line);
            if (in_array('TST=LISTEN', $record)) {
                return $pid;
            }
        }
    }
private static function findListeningProcessIdFromLsofOutput(array $output)
    {
        $pid = null;
        foreach ($output as $line) {
            if (substr_compare($line, 'p', 0, 1) === 0) {
                $pid = intval(substr($line, 1));
            }
            $record = explode("\0", $line);
            if (in_array('TST=LISTEN', $record)) {
                return $pid;
            }
        }
    }
@param array $output

@return int|null