PHPackages                             mckay/httpstatus - 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. mckay/httpstatus

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

mckay/httpstatus
================

Easy HTTP statuses.

v1.0.6(11y ago)15.7kMITPHPPHP &gt;=5.3.0

Since Apr 8Pushed 11y ago9 watchersCompare

[ Source](https://github.com/mckay-software/httpstatus.php)[ Packagist](https://packagist.org/packages/mckay/httpstatus)[ RSS](/packages/mckay-httpstatus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

HttpStatus.php
==============

[](#httpstatusphp)

*Class constants for HTTP statuses.*

Install
-------

[](#install)

Add it to your composer.json:

```
"mckay/httpstatus": "^1.0.4",
```

then run `$ composer update`.

Usage
-----

[](#usage)

```
use \McKay\HttpStatus;

if (!$user->isRoot()) {
	renderView(...);
	HttpStatus::set(HttpStatus::UNAUTHORIZED);
	return;
}

if (empty($resource)) {
	renderError(...);
	HttpStatus::set(HttpStatus::NOT_FOUND);
	return;
}

function renderError(...) {
	$code = HttpStatus::get();
	$description = HttpStatus::text();
	...
}
```

See [the source](https://github.com/mckay-software/httpstatus.php/blob/src/HttpStatus.php)for the complete list of available HTTP status constants.

License
-------

[](#license)

Copyright © McKay Software
MIT License

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Every ~5 days

Total

7

Last Release

4029d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/109a1bee8bd5f99ff67961c617b8a634ada2edc162d439e44c0409382763d931?d=identicon)[passcod](/maintainers/passcod)

---

Tags

httpstatus

### Embed Badge

![Health badge](/badges/mckay-httpstatus/health.svg)

```
[![Health](https://phpackages.com/badges/mckay-httpstatus/health.svg)](https://phpackages.com/packages/mckay-httpstatus)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[laminas/laminas-diactoros

PSR HTTP Message implementations

548105.8M965](/packages/laminas-laminas-diactoros)[laravel-lang/http-statuses

Translation of HTTP statuses

283.2M7](/packages/laravel-lang-http-statuses)

PHPackages © 2026

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