PHP code example of ahmard / http-status-codes
1. Go to this page and download the library: Download ahmard/http-status-codes library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ahmard / http-status-codes example snippets
= \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;
$sc = \HttpStatusCodes\StatusCode::CREATED;
// Get Description => "The request has been fulfilled, resulting in the creation of a new resource."
$sc->describe()->desc;