Internal/IdentificationHelper.php
public static function getMyFileDescriptors($includeStdIO = true)
    {
        $lsofPath = self::findLsof();
        exec(escapeshellarg($lsofPath).' -F f -p '.getmypid(), $output, $exitCode);
        if ($exitCode !== 0 || $output === null) {
            return [];
        }
        $output = array_map('trim', $output);
        $output = array_values(array_filter($output, function ($line) {
            return preg_match('#^f\\d+$#', $line);
        }));
        $fds = array_map(function ($line) {
            return intval(substr($line, 1));
        }, $output);
        sort($fds);
        if (!$includeStdIO) {
            $fds = self::removeStdIO($fds);
        }

        return $fds;
    }
public static function getMyFileDescriptors($includeStdIO = true)
    {
        $lsofPath = self::findLsof();
        exec(escapeshellarg($lsofPath).' -F f -p '.getmypid(), $output, $exitCode);
        if ($exitCode !== 0 || $output === null) {
            return [];
        }
        $output = array_map('trim', $output);
        $output = array_values(array_filter($output, function ($line) {
            return preg_match('#^f\\d+$#', $line);
        }));
        $fds = array_map(function ($line) {
            return intval(substr($line, 1));
        }, $output);
        sort($fds);
        if (!$includeStdIO) {
            $fds = self::removeStdIO($fds);
        }

        return $fds;
    }
@param bool $includeStdIO

@throws Exception\RuntimeException

@return array