1. Go to this page and download the library: Download fostam/getopts 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/ */
fostam / getopts example snippets
include "vendor/autoload.php";
$getopts = new Fostam\GetOpts\Handler();
$getopts->addOption('verboseLevel')
->short('v')
->long('verbose')
->description('increase verbosity')
->incrementable();
$getopts->addArgument('outputFile')
->name('output-file')
->
$option = $handler->addOption('inputFile');
$option->short('f');
$option->long('filename');
$option->description('input file with data to be processed');