PHP Classes

Read arguments: Read and validate shell 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
StarStarStarStar 66%Total: 306 All time: 7,364 This week: 47Up
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: 45 packages by
Country: Portugal Portugal

Screenshots (1)  
  • read-cli-arguments.png
  Files folder image Files (4)  
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

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:306
This week:0
All time:7,364
This week:47Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:501
 
Its a very good class ! lool BUt a little confuse, you embed ...
14 years ago (José Filipe Lopes Santos)
80%StarStarStarStarStar