PHP code example of arrayperu / http-code
1. Go to this page and download the library: Download arrayperu/http-code 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/ */
arrayperu / http-code example snippets
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