Constants enumerating the HTTP Status Codes. Based on the HTTP Status Code Registry.
You can install the package via Composer:
composer require logiek/http-status-codes
use Logiek\Http\StatusCode;
StatusCode::HTTP_OK; // 200
StatusCode::get(); // [100 => 'Continue', 101 => 'Switching Protocols', ...]
StatusCode::getReasonPhrase(StatusCode::HTTP_OK); // OK
StatusCode::getStatusCode('Not Found'); // 404
Please see the CHANGELOG for more information about recent changes.
Run the tests with:
composer test
This project is open-sourced software licensed under the MIT license.