PHP code example of bhrdn / diactoros

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

    

bhrdn / diactoros example snippets


$app = new \Diactoros\Diactoros;
$app->addReplacer(["Z" => "\u{0410}"]); // change Z with unicode char A
$app->addText(implode('', range("A", "Z")));
print_r($app->encode()); // A...A