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

ActiveLibrary

codingmatters/http-status-codes
===============================

Http Status Codes helper for PHP projects

0.0.0(6y ago)06GPL-3.0-or-laterPHPPHP ~7.3.15CI failing

Since May 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/value-objects/http-status-code-in-php)[ Packagist](https://packagist.org/packages/codingmatters/http-status-codes)[ RSS](/packages/codingmatters-http-status-codes/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

HTTP's status codes helper functions in PHP
===========================================

[](#https-status-codes-helper-functions-in-php)

[HTTP Status Codes](https://httpstatuses.com/) helper for PHP projects

Usage
-----

[](#usage)

If you want to show the code for the following message

```
use CodingMatters\Http\StatusCode;

StatusCode::FORBIDDEN; // returns 403
StatusCode::CREATED; // returns 201
```

Available helper functions:
---------------------------

[](#available-helper-functions)

### Informational

[](#informational)

```
StatusCode::CONTINUE; // 100
StatusCode::SWITCHING_PROTOCOL; // 101
StatusCode::PROCESSING; // 102
```

### Successful

[](#successful)

```
StatusCode::OK; // 200
StatusCode::CREATED; // 201
StatusCode::ACCEPTED; // 202
StatusCode::NON_AUTHORITATIVE_INFORMATION; // 203
StatusCode::NO_CONTENT; // 204
StatusCode::RESET_CONTENT; // 205
StatusCode::PARTIAL_CONTENT; // 206
StatusCode::MULTI_STATUS; // 207
StatusCode::ALREADY_REPORTED; // 208
StatusCode::IM_USED; // 226
```

### Redirection

[](#redirection)

```
StatusCode::MULTIPLE_CHOICES; // 300
StatusCode::MOVED_PERMANENTLY; // 301
StatusCode::FOUND; // 302
StatusCode::SEE_OTHER; // 303
StatusCode::NOT_MODIFIED; // 304
StatusCode::USE_PROXY; // 305
StatusCode::TEMPORARY_REDIRECT; // 307
StatusCode::PERMANENT_REDIRECT; // 308
```

### Client Error

[](#client-error)

```
StatusCode::BAD_REQUEST; // 400
StatusCode::UNAUTHORIZED; // 401
StatusCode::PAYMENT_REQUIRED; // 402
StatusCode::FORBIDDEN; // 403
StatusCode::NOT_FOUND; // 404
StatusCode::METHOD_NOT_ALLOWED; // 405
StatusCode::NOT_ACCEPTABLE; // 406
StatusCode::PROXY_AUTHENTICATION_REQUIRED; // 407
StatusCode::REQUEST_TIMEOUT; // 408
StatusCode::CONFLICT; // 409
StatusCode::GONE; // 410
StatusCode::LENGTH_REQUIRED; // 411
StatusCode::PRECONDITION_FAILED; // 412
StatusCode::PAYLOAD_TOO_LARGE; // 413
StatusCode::REQUEST_URI_TOO_LONG; // 414
StatusCode::UNSUPPORTED_MEDIA_TYPE; // 415
StatusCode::REQUESTED_RANGE_NOT_SATISFIABLE; // 416
StatusCode::EXPECTATION_FAILED; // 417
StatusCode::IM_A_TEAPOT; // 418
StatusCode::MISDIRECTED_REQUEST; // 421
StatusCode::UNPROCESSABLE_ENTITY; // 422
StatusCode::LOCKED; // 423
StatusCode::FAILED_DEPENDENCY; // 424
StatusCode::UPGRADE_REQUIRED; // 426
StatusCode::PRECONDITION_REQUIRED; // 428
StatusCode::TOO_MANY_REQUEST; // 429
StatusCode::REQUEST_HEADER_FIELDS_TOO_LARGE; // 431
StatusCode::CONNECTION_CLOSED_WITHOUT_RESPONSE; // 444
StatusCode::UNAVAILABLE_FOR_LEGAL_REASONS; // 451
StatusCode::CLIENT_CLOSED_REQUEST; // 499
```

### Server Error

[](#server-error)

```
StatusCode::INTERNAL_SERVER_ERROR; // 500
StatusCode::NOT_IMPLEMENTED; // 501
StatusCode::BAD_GATEWAY; // 502
StatusCode::SERVICE_UNAVAILABLE; // 503
StatusCode::GATEWAY_TIMEOUT; // 504
StatusCode::HTTP_VERSION_NOT_SUPPORTED; // 505
StatusCode::VARIANT_ALSO_NEGOTIATES; // 506
StatusCode::INSUFFICIENT_STORAGE; // 507
StatusCode::LOOP_DETECTED; // 508
StatusCode::NOT_EXTENDED; // 510
StatusCode::NETWORK_AUTHENTICATION_REQUIRED; // 511
StatusCode::NETWORK_CONNECT_TIMEOUT_ERROR; // 599
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

2202d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27f2198c3823562b45ef642286a0bca77b6c6c69a3ce206d9eb9e72306233195?d=identicon)[gabbydgab](/maintainers/gabbydgab)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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