PHPackages                             kayobruno/http-status-code - 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. kayobruno/http-status-code

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

kayobruno/http-status-code
==========================

The "HTTP Status Code Abstraction" project is a PHP 8-based initiative aimed at simplifying the management and usage of HTTP status codes by introducing ENUM support. HTTP status codes are integral to web development, providing vital information about the success or failure of HTTP requests and responses. However, managing and referencing these status codes in a clear and organized manner can often be challenging. This project seeks to address this challenge by leveraging PHP 8's ENUM feature.

00PHP

Since Sep 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kayobruno/http-status-code)[ Packagist](https://packagist.org/packages/kayobruno/http-status-code)[ RSS](/packages/kayobruno-http-status-code/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Http Status Code
----------------

[](#http-status-code)

The "HTTP Status Code Abstraction" project is a PHP 8-based initiative aimed at simplifying the management and usage of HTTP status codes by **ENUM**. HTTP status codes are integral to web development, providing vital information about the success or failure of HTTP requests and responses. However, managing and referencing these status codes in a clear and organized way can often be tedious and time-consuming.. This project seeks to address this challenge by leveraging PHP 8's ENUM feature.

Status codes are divided into **five main categories**, each with its own range of numbers to indicate different types of responses.

#### Informational

[](#informational)

- Codes in this category start with "1" (for example, 100, 101).
- They are used to inform the client that the request has been received and is being processed.

#### Successful

[](#successful)

- Codes in this category start with "2" (for example, 200, 201).
- They indicate that the request has been received, understood, and accepted successfully.

#### Redirection

[](#redirection)

- Codes in this category start with "3" (for example, 301, 302).
- They are used to indicate that the client should take some additional action to complete the request.

#### Client Errors

[](#client-errors)

- Codes in this category start with "4" (for example, 400, 404).
- They indicate that there was an error in the request made by the client, either due to a syntax error, insufficient permissions, or resources not found.

#### Server Errors

[](#server-errors)

- Codes in this category start with "5" (for example, 500, 502).
- They indicate that there was an error on the server while processing the request, typically due to internal server failures.

### Examples

[](#examples)

```
echo HttpStatusCode::OK->value; // 200
echo HttpStatusCode::OK->isSuccess(); // true
echo HttpStatusCode::OK->category(); // HttpStatusCodeCategory::SUCCESSFUL
echo HttpStatusCode::OK->description(); // The request has succeeded

```

This project is an open-sourced software licensed under the [MIT license](https://opensource.org/license/mit/).

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

hacktoberfest

### Embed Badge

![Health badge](/badges/kayobruno-http-status-code/health.svg)

```
[![Health](https://phpackages.com/badges/kayobruno-http-status-code/health.svg)](https://phpackages.com/packages/kayobruno-http-status-code)
```

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M317](/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)
