PHPackages                             bfunky/http-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. bfunky/http-parser

ActiveLibrary[HTTP &amp; Networking](/categories/http)

bfunky/http-parser
==================

A library to parse HTTP headers and HTTP header fields

2.2.2(8y ago)735.2k↓28.8%6[1 issues](https://github.com/bfunky/http-parser/issues)MITPHPPHP 7.1.\*

Since Apr 23Pushed 8y ago2 watchersCompare

[ Source](https://github.com/bfunky/http-parser)[ Packagist](https://packagist.org/packages/bfunky/http-parser)[ RSS](/packages/bfunky-http-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

HTTP Parser
===========

[](#http-parser)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a4e750fefb75bd36c4479ae59aa9f2e77b3fb2383721ab09c749b299095c9e59/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6266756e6b792f687474702d7061727365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bfunky/http-parser/?branch=master)[![Build Status](https://camo.githubusercontent.com/30841828587b19d7cade474e8469ff4420b5f780695998b72e7dfa86bb0dbcfe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6266756e6b792f687474702d7061727365722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bfunky/http-parser/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/4545dfd2de25f50a1d15536cf7e204b5b5c2771f92f1b354d1611091a98f2de3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6266756e6b792f687474702d7061727365722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bfunky/http-parser/?branch=master)

A library to parse HTTP header and HTTP header fields

Usage
=====

[](#usage)

Parsing a request
-----------------

[](#parsing-a-request)

```
        $rawHttp = get('Host');
        //output url.com:80
        /**
         * Managing Http header
         * @var HttpRequestHeader $entityHeader
         */
        $entityHeader = $parser->getHeader();
        echo $entityHeader->getMethod();
        //output POST
        echo $entityHeader->getPath();
        //output /path
        echo $entityHeader->getProtocol();
        //output HTTP/1.1
```

Parsing a response
------------------

[](#parsing-a-response)

```
        $rawHttp = get('Content-Type');
        //output text/xml
        /**
         * Managing Http header
         * @var HttpRequestHeader $entityHeader
         */
        $entityHeader = $parser->getHeader();
        echo $entityHeader->getMessage();
        //output OK
        echo $entityHeader->getCode();
        //output 200
        echo $entityHeader->getProtocol();
        //output HTTP/1.1
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~106 days

Recently: every ~64 days

Total

7

Last Release

3042d ago

Major Versions

1.0.1 → 2.0.02017-05-07

PHP version history (4 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP &gt;=7.0

2.2.1PHP &gt;=7.2

2.2.2PHP 7.1.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/f57cd40c8e15110780307380d867586fd5fb87e99cbb333063c6dd45b1aea231?d=identicon)[bfunky](/maintainers/bfunky)

---

Top Contributors

[![deadkash](https://avatars.githubusercontent.com/u/1226395?v=4)](https://github.com/deadkash "deadkash (1 commits)")[![JairoRodriguezBG](https://avatars.githubusercontent.com/u/33019953?v=4)](https://github.com/JairoRodriguezBG "JairoRodriguezBG (1 commits)")

---

Tags

httpparserhttp requesthttp-responsehttp parserhttp fields

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bfunky-http-parser/health.svg)

```
[![Health](https://phpackages.com/badges/bfunky-http-parser/health.svg)](https://phpackages.com/packages/bfunky-http-parser)
```

###  Alternatives

[riverline/multipart-parser

One class library to parse multipart content with encoding and charset support.

17057.4M55](/packages/riverline-multipart-parser)[duzun/hquery

An extremely fast web scraper that parses megabytes of HTML in a blink of an eye. No dependencies. PHP5+

363146.3k4](/packages/duzun-hquery)[aura/http

The Aura HTTP package provides objects to build and send HTTP responses from the server to the client.

7338.8k4](/packages/aura-http)[mimmi20/browser-detector

Library to detect Browsers and Devices

48153.5k3](/packages/mimmi20-browser-detector)[popphp/pop-http

Pop Http Component for Pop PHP Framework

1018.5k13](/packages/popphp-pop-http)[vdb/uri

A set of URI classes and a URI parser, based on RFC 3986

11225.6k2](/packages/vdb-uri)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
