PHP code example of ethnam / getopt
1. Go to this page and download the library: Download ethnam/getopt 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/ */
ethnam / getopt example snippets
use Ethnam\Getopt\Getopt;
$opt = new Getopt();
$arg_list = $opt->readGlobalArgv();
array_shift($arg_list); // remove commant itself
$opt->getopt($my_arg_list, "v", array("version"));