PHPackages                             yaroslawww/http-statuscodes - 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. yaroslawww/http-statuscodes

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

yaroslawww/http-statuscodes
===========================

PHP library for handling HTTP status codes

0.1.0(4y ago)116911MITPHPPHP ^7.2|^8.0CI failing

Since Oct 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/yaroslawww/http-statuscodes)[ Packagist](https://packagist.org/packages/yaroslawww/http-statuscodes)[ RSS](/packages/yaroslawww-http-statuscodes/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (3)Used By (1)

Http status codes library
=========================

[](#http-status-codes-library)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/8a8f3a2ff85003ba8b92976e65aeaa90a7f88cb9b8d2896b511f9a7fb59d4c24/68747470733a2f2f7472617669732d63692e6f72672f7961726f736c617777772f687474702d737461747573636f6465732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yaroslawww/http-statuscodes)[![StyleCI](https://camo.githubusercontent.com/67601652092bff0bd286b6f879f7d3a758ae5d10af599dad75789d6fe00d2c7c/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139353330323538382f736869656c643f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.styleci.io/repos/215622139)[![Quality Score](https://camo.githubusercontent.com/47c1c77506c72ace39b66cf9a6f20d5a94d85dece01c46a11483776ba3137d65/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7961726f736c617777772f687474702d737461747573636f6465732e7376673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/http-statuscodes/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/169285a222103320723f5f81b9e864ee6664b14ee00a0a40563afd17197e1d00/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7961726f736c617777772f687474702d737461747573636f6465732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/yaroslawww/http-statuscodes/?branch=master)[![PHP Version](https://camo.githubusercontent.com/247f655a66356bb09a5666efa3b753e9716762c9b33b6b9fdd31f38eb246df77/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d762f7961726f736c617777772f687474702d737461747573636f6465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yaroslawww/http-statuscodes)[![Packagist Version](https://camo.githubusercontent.com/c5dd76b67267caf5e675a0e933c3edceedf492b573c93c55bf7e9171ca2f1257/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7961726f736c617777772f687474702d737461747573636f6465732e737667)](https://packagist.org/packages/yaroslawww/http-statuscodes)

Installation
------------

[](#installation)

You can install the package via composer:

```
    composer require yaroslawww/http-statuscodes
```

### Simple example

[](#simple-example)

```
    $manager = new \HttpStatusCodes\StatusCodeManager();
    $statusCode = $manager->makeStatusCode(201);
    if($statusCode) {
        $statusCode->getMessage();
        $statusCode->getCode();
        $statusCode->getDescription();
        $statusCode->getRFCNumber();
    }
```

```
    $manager = new \HttpStatusCodes\StatusCodeManager();
    $statusCode = $manager->makeStatusCode('HTTP_OK');
    if($statusCode) {
        $statusCode->getMessage();
        $statusCode->getCode();
        $statusCode->getDescription();
        $statusCode->getRFCNumber();
    }
```

```
    class CustomStatusCodes
    {
        /**
         * @rfc 1133
         * @description Test Description New Ok
         * @message OKAY!
         */
        const HTTP_OKAY = 3333;
    }
    $manager = new \HttpStatusCodes\StatusCodeManager();
    $statusCode = $manager->makeStatusCode(3333);
    if($statusCode) {
        $statusCode->getMessage();
        $statusCode->getCode();
        $statusCode->getDescription();
        $statusCode->getRFCNumber();
    }
```

Testing
-------

[](#testing)

```
    ./vendor/bin/phpunit
    # or
    composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~897 days

Total

2

Last Release

1500d ago

PHP version history (2 changes)0.0.1PHP ^7.2

0.1.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/66f778dcd7a390dcb08d29ee36d431684877ace6b0f7c3d68f4384409f2b0fac?d=identicon)[yaroslawww](/maintainers/yaroslawww)

---

Top Contributors

[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (8 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yaroslawww-http-statuscodes/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M318](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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