PHP code example of frolikov / cligraph

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

    

frolikov / cligraph example snippets


$maxBarLength = 50;
$drawer = new \CliGraph\Drawer($maxBarLength);
$percents = 33;

print PHP_EOL;
print "{$percents} percents or {$maxBarLength} symbols: \n";
print $drawer->getBar($percents) . PHP_EOL;
print PHP_EOL;