PHPackages                             intenave/http-response-status-codes - 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. intenave/http-response-status-codes

ActiveLibrary

intenave/http-response-status-codes
===================================

Package provides an enumeration of standard HTTP status codes along with convenient methods for working with them.

v1.0.0(2y ago)144MITPHPPHP ^8.2

Since Oct 22Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Http Response Status Code PHP Package
=====================================

[](#http-response-status-code-php-package)

Description
-----------

[](#description)

The `HttpResponseStatusCode` PHP package is a utility for managing HTTP response status codes. It provides an enumeration of standard HTTP status codes along with convenient methods for working with them.

Features
--------

[](#features)

- Enumerates standard HTTP response status codes with both their names and values.
- Provides methods to retrieve codes, names, and options for HTTP status codes.
- Offers methods to check if a given code is a success (in the 200-299 range).

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

[](#installation)

You can install this package via Composer:

```
composer require intenave/http-response-status-codes
```

Usage
-----

[](#usage)

Using the `HttpResponseStatusCode` package is straightforward. You can access the predefined HTTP status codes, check for success, and retrieve code information as needed.

### Getting a Specific Status Code

[](#getting-a-specific-status-code)

You can easily obtain a specific HTTP status code using the package:

```
$status = HttpResponseStatusCode::OK(); // Get the "OK" (200) status code
```

### Checking if a Code is a Success

[](#checking-if-a-code-is-a-success)

You can use the isSuccess() method to check if a code is a success (in the 200-299 range):

```
$isSuccess = $status->isSuccess(); // Check if it's a success code (in the 200-299 range)

if ($isSuccess) {
    // Handle a successful response.
} else {
    // Handle a non-successful response.
}
```

### Retrieving Codes, Names, and Options

[](#retrieving-codes-names-and-options)

You can also retrieve information about the available status codes:

- To get an array of all status codes (values only):

```
$codes = HttpResponseStatusCode::codes();
```

- To get an array of all status code names:

```
$names = HttpResponseStatusCode::names();
```

- To get an associative array of code names and values:

```
$options = HttpResponseStatusCode::options();
```

These methods provide flexibility and ease of use when working with HTTP status codes in your PHP applications.

Contributing
------------

[](#contributing)

This package is maintained under the Intenave organization. If you'd like to contribute or report issues, please visit the [GitHub repository](https://github.com/intenave/http-response-status-codes).

License
-------

[](#license)

This package is open-source and available under the MIT License. See the [LICENSE](https://github.com/intenave/http-response-status-codes/blob/main/LICENSE.md) file for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

930d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fee135d8f35fa155f09ab9f8d7fd169d381ede557c2f63c5f1fa9ae41ad4343?d=identicon)[jahdez183](/maintainers/jahdez183)

![](https://avatars.githubusercontent.com/u/10600183?v=4)[Yamir Acosta Lozada](/maintainers/yamirherblay)[@yamirherblay](https://github.com/yamirherblay)

---

Top Contributors

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

---

Tags

intenavehttp-response-status-codes

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/intenave-http-response-status-codes/health.svg)

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

PHPackages © 2026

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