PHP HTTP Status Code Constants: Get messages and descriptions of HTTP status codes

Recommend this page to a friend!
  Info   View files (7)   Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-09-24 (10 months ago) Not yet rated by the usersTotal: 190 All time: 8,398 This week: 238
Version License PHP version Categories
http-status-codes 1.0.0MIT/X Consortium ...5HTTP, PHP 5
Description Author

This class can be used to get messages and descriptions of HTTP status codes.

It contains definitions of constants all common HTTP response status codes including the respective message to be returned with the code in a HTTP response and the respective description.

The class can return the message or the description for a given HTTP status code.

Innovation Award
PHP Programming Innovation award nominee
September 2019
Number 12
HTTP status codes are important to return to the browser or the HTTP client that sends a request to a Web server. They return a code and and message that tell if the request succeeded or not.

This class can return the message and and description associated to many known HTTP status codes, so applications can generate HTTP status response headers without having to know how to format them correctly.

Manuel Lemos
Picture of Kacper Rowinski
  Performance   Level  
Name: Kacper Rowinski <contact>
Classes: 13 packages by
Country: Poland Poland
Age: 36
All time rank: 98028 in Poland Poland
Week rank: 61 1 in Poland Poland
Innovation award
Innovation award
Nominee: 7x



PHP List of HTTP status codes, messages and description for them.


Almost every framework got one but none external as external package to use in your own project. Hope this will help others.

File Role Description
src (1 directory)
tests (1 directory)
.travis.yml Data Auxiliary data
composer.json Data Auxiliary data
LICENSE Lic. License text
phpunit.xml Data Auxiliary data Doc. Documentation

  Files  /  src  
File Role Description
HttpStatusCodes (1 file)

  Files  /  src  /  HttpStatusCodes  
File Role Description
   HttpStatusCodes.php Class Class source

  Files  /  tests  
File Role Description
Unit (1 file)

  Files  /  tests  /  Unit  
File Role Description
   HttpStatusCodesTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,398
This week:238

For more information send a message to info at phpclasses dot org.