arrayperu / http-code
PHP Library for HTTP Status codes.
v1.0.0
2021-09-24 19:35 UTC
Requires
- php: ^5.4 || ^7.0 || ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-25 04:10:26 UTC
README
PHP Library for HTTP Status codes.
Table of Contents
Installation
Composer
composer require arrayperu/http-code
Usage
use ArrayPeru\HttpCode; echo HttpCode::HTTP_OK; // 200 echo HttpCode::text(HttpCode::HTTP_OK); // OK echo HttpCode::HTTP_NOT_FOUND; // 404 echo HttpCode::text(HttpCode::HTTP_NOT_FOUND); // Not Found echo HttpCode::HTTP_INTERNAL_SERVER_ERROR; // 500 echo HttpCode::text(HttpCode::HTTP_INTERNAL_SERVER_ERROR); // Internal Server Error