PHP code example of troublete / cli

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

    

troublete / cli example snippets



function Cli\cli;

$app = cli($argv, 'Usage: <flags>');

if ($app->flags->someFlag !== false) {
	$app->print($app->flags->someFlag);
	exit;
}
bash
$ php cli.php --someFlag 🌈