Skip to content

luoyecb/arg_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arg_parser

A simple command line option parser.

Example:

$parser = new ArgParser;
$parser->addBool('flag', false);
$parser->addInt('times', 3);
$parser->addFloat('salary', 14000.00);
$parser->addString('c', 'this is comment');

$parser->parse();
var_dump($parser->getArgs());

$opts = $parser->getOptions();
var_dump($opts);

extract($opts);
// $flag
// $times
// $salary
// $c

var_dump($parser->getOption('flag'));

About

A simple command line option parser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published