PHP Classes

CLI args: Parse and process command line arguments

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 359 All time: 6,922 This week: 68Up
Version License PHP version Categories
argv 2GNU General Publi...5PHP 5, Console
Description 

Author

This class can be used to parse and process command line arguments.

It takes a definition of the arguments that the command expects, like the argument name, required flag and default value.

The class can parse and processed the arguments according to the defined rules and returns an array of argument values if arguments are passed correctly.

It can also output an help message when the -h, -help or --help switches are passed.

Picture of Dennis T Kaplan
Name: Dennis T Kaplan <contact>
Classes: 5 packages by
Country: United States United States
Age: 58
All time rank: 1391204 in United States United States
Week rank: 206 Up24 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Screenshots (1)  
  • Screenshot.png
  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file argv.php Class Capture command line arguments in to your php script
Accessible without login Plain text file testargv.php Example Example usage

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:359
This week:0
All time:6,922
This week:68Up