1. Go to this page and download the library: Download jacekciach/commandline 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/ */
jacekciach / commandline example snippets
CommandLine\CommandLine;
$cmd = new CommandLine();
var_export(array(
"binary" => $cmd->binary(), // returns PHP_BINARY
"script" => $cmd->script(), // returns the name of the script
"options" => $cmd->options(), // returns all "options" passed from command line
"params" => $cmd->params(), // returns all "params" passed from command line
));
echo PHP_EOL;