PHPackages                             liopoos/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. liopoos/http-code

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

liopoos/http-code
=================

Simple HTTP status codes

1.0.3(6mo ago)0151MITPHPPHP ^7.3|^8.0

Since Jan 13Pushed 6mo ago1 watchersCompare

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

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

HTTP Code
=========

[](#http-code)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/32200fe9b93c2c26c0978793b9e384a8e9277b5b7e4dff563f22c09d7e728081/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e33253242253230253743253230382e302532422d626c75652e737667)](https://www.php.net/)

A simple, lightweight PHP library for handling HTTP status codes in a more readable and maintainable way. This library provides all standard HTTP status codes as easy-to-use constants and methods.

Features
--------

[](#features)

- ✅ **Complete Coverage**: All standard HTTP status codes (1xx, 2xx, 3xx, 4xx, 5xx)
- ✅ **Dual Access**: Use as constants or static methods
- ✅ **Type Safe**: Fully documented with PHPDoc
- ✅ **Helper Methods**: Built-in utilities like `isSuccessful()`
- ✅ **Zero Dependencies**: Lightweight and standalone
- ✅ **PSR-4 Autoloading**: Modern PHP standards

Requirements
------------

[](#requirements)

- PHP 7.3 or higher
- Composer

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

[](#installation)

Install via Composer:

```
composer require liopoos/http-code
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
