PHP code example of logiek / http-status-codes

1. Go to this page and download the library: Download logiek/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/ */

    

logiek / http-status-codes example snippets


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