PHP Classes

CLI args: Parse and process command line arguments

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   Screenshots Screenshots   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-04-15 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 343 This week: 1All time: 6,526 This week: 1,125Up
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: 50
All time rank: 1346179 in United States United States
Week rank: 922 Up95 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  • Screenshot.png
  Files folder image Files  
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

 Version Control Unique User Downloads Download Rankings  
 0%Total:343All time:6,526
 This week:1This week:1,125Up