2017 © Pedro Peláez
 

library args

Command line arguments

image

cliphp/args

Command line arguments

  • Friday, July 6, 2018
  • by cdtweb
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 5 Versions
  • 25 % Grown

The README.md

cliphp/args

Build Status, (*1)

Library for command line arguments., (*2)

use Cliphp;

$args = new Args;

// Check for --help flag
if ($args->has('help')) {
    // show help message
}

// Get limit value
$limit = $args->get('limit') ?? 100;

Notes

The global $argv variable returns the script name (e.g. index.php) as the first value in the array. This library will shift the script name from the arguments list., (*3)

Available Methods

  • get(string $arg): mixed|null Returns value of an argument or NULL if it doesn't exist.
  • has(string $arg): bool Checks for existence of an argument
  • all(): array Get all of the arguments
  • count(): int Get count of arguments

The Versions

06/07 2018

dev-master

9999999-dev https://github.com/cliphp/args

Command line arguments

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Clint Tyler

cli php7 args cliphp

06/07 2018

1.0.4

1.0.4.0 https://github.com/cliphp/args

Command line arguments

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Clint Tyler

cli php7 args cliphp

02/12 2017

1.0.3

1.0.3.0 https://github.com/cliphp/args

Command line arguments

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Clint Tyler

cli php7 args cliphp

28/11 2017

1.0.2

1.0.2.0 https://github.com/cliphp/args

Command line arguments

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Clint Tyler

cli php7 args cliphp

09/11 2017

1.0.1

1.0.1.0 https://github.com/cliphp/args

Command line arguments

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

by Clint Tyler

cli php7 args cliphp