Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2023-05-06 (5 months ago) ![]() | Not yet rated by the users | Total: 58 | All time: 10,397 This week: 88![]() |
Version | License | PHP version | Categories | |||
http-status-class 1.0 | Shareware | 5 | HTTP, PHP 5 |
Description | Author | |||||||||||||||||||||||
This package can return HTTP status codes and their descriptions. |
|
Enums of all official http status codes and their descriptions.
composer require ahmard/http-status-codes
<?php
require __DIR__ . '/vendor/autoload.php';
$sc = \HttpStatusCodes\StatusCode::CREATED;
// Get Status Code => "201"
$sc->value;
$desc = $sc->describe();
// Get Status Code => "201"
$desc->code;
// Get Status Code Title => "Created"
$desc->title;
You can also get description of a given status code, the description is copied from Wikipedia.
<?php
$sc = \HttpStatusCodes\StatusCode::CREATED;
// Get Description => "The request has been fulfilled, resulting in the creation of a new resource."
$sc->describe()->desc;
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Read me |
![]() |
/ | src |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() ![]() |
Aux. | Auxiliary script |
![]() |
Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.