private static function parseRangeHeader($header) { if (preg_match('/bytes=(?P<first>\\d+)-(?P<last>\\d+)?/', $header, $matches)) { return [(int) $matches['first'], isset($matches['last']) ? (int) $matches['last'] : null]; } return false; }