PHP Classes

PHP Command Line Parser: Invoke functions to process command-line arguments

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-04-21 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 59 All time: 10,372 This week: 78Up
Version License PHP version Categories
clp 1.0Free For Educatio...7Console, PHP 7
Description 

Author

siims


Contributor

This package can invoke functions to process command-line arguments.

It can take as a parameter the $argv array passed to PHP as the array of command line arguments and an array that defines options on how to process those arguments.

The package can process the arguments by invoking a callback function that applications pass to process the command line argument values.

It can also call a given callback function to process when all arguments are processed and when no arguments are passed to the package.

Innovation Award
PHP Programming Innovation award nominee
April 2023
Number 11
PHP can start running scripts from the command line console shell using the PHP CLI version.

Those scripts may take arguments passed by the users in front of the PHP script name.

PHP can create an array of arguments to make it easier for the scripts to process the parameters.

This package simplifies the processing of arguments by providing a means to call given functions to help developers process each type of argument separately.

Manuel Lemos
Picture of Mat Jung
  Performance   Level  
Name: Mat Jung <contact>
Classes: 4 packages by
Country: Switzerland Switzerland
Age: 47
All time rank: 389331 in Switzerland Switzerland
Week rank: 411 Up6 in Switzerland Switzerland Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file Example1.php Example Example script
Plain text file Example2.php Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  src  
File Role Description
  Plain text file clp.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:59
This week:0
All time:10,372
This week:78Up