PHP Classes

Read arguments: Read and validate shell command line arguments

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-09-30 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 291 All time: 6,926 This week: 1,173Up
Version License PHP version Categories  
read-cli-arguments 1.0.0BSD License3.0Console, Validation
Description Author  

This class can can be used to read and validate shell command line arguments.

It can parse the values of arguments passed to a PHP script started from a command line shell to validate them according to rules defined by the current script.

It supports mandatory arguments, optional arguments, switch arguments, multiple alternatives to an option switches, and a special argument that makes show a nicely formatted help usage message.

The class extract the argument values into an array if the argument rules are validated.

Picture of Manuel Lemos
  Performance   Level  
Name: Manuel Lemos <contact>
Classes: 38 packages by
Country: Portugal Portugal
Age: 47
All time rank: 1
Week rank: 3 Down1 in Portugal Portugal Equal

  • read-cli-arguments.png
  Files folder image Files  
File Role Description
Plain text file read_arguments.php Class Read arguments class
Accessible without login HTML file read_arguments_class.html Doc. Class documentation
Accessible without login Plain text file test_read_arguments.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 0%Total:291All time:6,926
 This week:0This week:1,173Up
 User Comments (1)  
Its a very good class ! lool BUt a little confuse, you embed ...
5 years ago (Josť Filipe Lopes Santos)