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

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

arrayperu/http-code
===================

PHP Library for HTTP Status codes.

v1.0.0(4y ago)08Apache-2.0PHPPHP ^5.4 || ^7.0 || ^8.0

Since Sep 24Pushed 4y ago1 watchersCompare

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

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

HTTP Code Library
=================

[](#http-code-library)

[![Latest Stable Version](https://camo.githubusercontent.com/f1f98a8fe7319497a0d63dbf1cf38000f7b994c464bca1d84d904038a628f3e1/687474703a2f2f706f7365722e707567782e6f72672f6172726179706572752f687474702d636f64652f76)](https://packagist.org/packages/arrayperu/http-code) [![Total Downloads](https://camo.githubusercontent.com/38d5312eed0d5f6b894204803179fd29a04e39ddb45a184b08beb98aee76cb41/687474703a2f2f706f7365722e707567782e6f72672f6172726179706572752f687474702d636f64652f646f776e6c6f616473)](https://packagist.org/packages/arrayperu/http-code) [![Latest Unstable Version](https://camo.githubusercontent.com/273ce4048e2d073e28e434acf29b79af41c0f7eb57faca7f89a2d6c5523ab28b/687474703a2f2f706f7365722e707567782e6f72672f6172726179706572752f687474702d636f64652f762f756e737461626c65)](https://packagist.org/packages/arrayperu/http-code) [![License](https://camo.githubusercontent.com/74933180e9f34f3202bd4e71675f0de3b9ee216d83e07694538c06bbcbe5ddb4/687474703a2f2f706f7365722e707567782e6f72672f6172726179706572752f687474702d636f64652f6c6963656e7365)](https://packagist.org/packages/arrayperu/http-code) [![PHP Version Require](https://camo.githubusercontent.com/545b5d2cccf490d1729e77c4221dd8ba3743775a4963482af33975120354a6ee/687474703a2f2f706f7365722e707567782e6f72672f6172726179706572752f687474702d636f64652f726571756972652f706870)](https://packagist.org/packages/arrayperu/http-code)

PHP Library for HTTP Status codes.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Table of reference](#table-of-reference)
    - [1xx - Informational](#1xx---informational)
    - [2xx - Successful](#2xx---successful)
    - [3xx - Redirect](#3xx---redirect)
    - [4xx - Client Error](#4xx---client-error)
    - [5xx - Server Error](#5xx---server-error)

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

[](#installation)

Composer

```
composer require arrayperu/http-code

```

Usage
-----

[](#usage)

```
use ArrayPeru\HttpCode;

echo HttpCode::HTTP_OK; // 200
echo HttpCode::text(HttpCode::HTTP_OK); // OK

echo HttpCode::HTTP_NOT_FOUND; // 404
echo HttpCode::text(HttpCode::HTTP_NOT_FOUND); // Not Found

echo HttpCode::HTTP_INTERNAL_SERVER_ERROR; // 500
echo HttpCode::text(HttpCode::HTTP_INTERNAL_SERVER_ERROR); // Internal Server Error
```

Table of reference
------------------

[](#table-of-reference)

### 1xx - Informational

[](#1xx---informational)

PropertyCodeText`HTTP_CONTINUE`100Continue`HTTP_SWITCHING_PROTOCOLS`101Switching Protocols`HTTP_PROCESSING`102Processing`HTTP_EARLY_HINTS`103Early Hints### 2xx - Successful

[](#2xx---successful)

PropertyCodeText`HTTP_OK`200OK`HTTP_CREATED`201Created`HTTP_ACCEPTED`202Accepted`HTTP_NON_AUTHORITATIVE_INFORMATION`203Non-Authoritative Information`HTTP_NO_CONTENT`204No Content`HTTP_RESET_CONTENT`205Reset Content`HTTP_PARTIAL_CONTENT`206Partial Content`HTTP_MULTI_STATUS`207Multi-Status`HTTP_ALREADY_REPORTED`208Already Reported`HTTP_IM_USED`226IM Used### 3xx - Redirect

[](#3xx---redirect)

PropertyCodeText`HTTP_MULTIPLE_CHOICES`300Multiple Choices`HTTP_MOVED_PERMANENTLY`301Moved Permanently`HTTP_FOUND`302Found`HTTP_SEE_OTHER`303See Other`HTTP_NOT_MODIFIED`304Not Modified`HTTP_USE_PROXY`305Use Proxy`HTTP_RESERVED`306Reserved`HTTP_TEMPORARY_REDIRECT`307Temporary Redirect`HTTP_PERMANENTLY_REDIRECT`308Permanent Redirect### 4xx - Client Error

[](#4xx---client-error)

PropertyCodeText`HTTP_BAD_REQUEST`400Bad Request`HTTP_UNAUTHORIZED`401Unauthorized`HTTP_PAYMENT_REQUIRED`402Payment Required`HTTP_FORBIDDEN`403Forbidden`HTTP_NOT_FOUND`404Not Found`HTTP_METHOD_NOT_ALLOWED`405Method Not Allowed`HTTP_NOT_ACCEPTABLE`406Not Acceptable`HTTP_PROXY_AUTHENTICATION_REQUIRED`407Proxy Authentication Required`HTTP_REQUEST_TIMEOUT`408Request Timeout`HTTP_CONFLICT`409Conflict`HTTP_GONE`410Gone`HTTP_LENGTH_REQUIRED`411Length Required`HTTP_PRECONDITION_FAILED`412Precondition Failed`HTTP_REQUEST_ENTITY_TOO_LARGE`413Payload Too Large`HTTP_REQUEST_URI_TOO_LONG`414URI Too Long`HTTP_UNSUPPORTED_MEDIA_TYPE`415Unsupported Media Type`HTTP_REQUESTED_RANGE_NOT_SATISFIABLE`416Range Not Satisfiable`HTTP_EXPECTATION_FAILED`417Expectation Failed`HTTP_I_AM_A_TEAPOT`418I'm a teapot`HTTP_MISDIRECTED_REQUEST`421Misdirected Request`HTTP_UNPROCESSABLE_ENTITY`422Unprocessable Entity`HTTP_LOCKED`423Locked`HTTP_FAILED_DEPENDENCY`424Failed Dependency`HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL`425Reserved for WebDAV advanced collections expired proposal`HTTP_UPGRADE_REQUIRED`426Upgrade Required`HTTP_PRECONDITION_REQUIRED`428Precondition Required`HTTP_TOO_MANY_REQUESTS`429Too Many Requests`HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE`431Request Header Fields Too Large`HTTP_UNAVAILABLE_FOR_LEGAL_REASONS`451Unavailable For Legal Reasons### 5xx - Server Error

[](#5xx---server-error)

PropertyCodeText`HTTP_INTERNAL_SERVER_ERROR`500Internal Server Error`HTTP_NOT_IMPLEMENTED`501Not Implemented`HTTP_BAD_GATEWAY`502Bad Gateway`HTTP_SERVICE_UNAVAILABLE`503Service Unavailable`HTTP_GATEWAY_TIMEOUT`504Gateway Timeout`HTTP_VERSION_NOT_SUPPORTED`505HTTP Version Not Supported`HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL`506Variant Also Negotiates`HTTP_INSUFFICIENT_STORAGE`507Insufficient Storage`HTTP_LOOP_DETECTED`508Loop Detected`HTTP_NOT_EXTENDED`510Not Extended`HTTP_NETWORK_AUTHENTICATION_REQUIRED`511Network Authentication Required

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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

1697d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

httplaravelcodestatusstatus codehttp statushttp-status-codelaravel http statuslaravel http status codelaravel status code

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel-lang/common

Easily connect the necessary language packs to the application

1463.1M22](/packages/laravel-lang-common)[laravel-lang/http-statuses

Translation of HTTP statuses

283.2M7](/packages/laravel-lang-http-statuses)[ph-7/just-http-status-codes

Just all HTTP status codes

1447.7k4](/packages/ph-7-just-http-status-codes)[vinelab/http

An http library developed for the laravel framework. aliases itself as HttpClient

59300.2k11](/packages/vinelab-http)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

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