PHP code example of cliphp / args
1. Go to this page and download the library: Download cliphp/args library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cliphp / args example snippets
use Cliphp;
$args = new Args;
// Check for --help flag
if ($args->has('help')) {
// show help message
}
// Get limit value
$limit = $args->get('limit') ?? 100;