Skip to content

A easy tool to parse cli arguments into a args arrray.

Notifications You must be signed in to change notification settings

minhsieh/php-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP Command Parser

PHP Command Parser可以用來在php cli操作時,以更方便更快捷的方式將參數傳遞。

Install

composer require minhsieh/php-command

Usage

#php test.php --foo=bar
require "vendor/autoload.php";

use Command\Parser;

$args = Parser::parse($_SERVER['argv']);

echo $args['foo'];
//bar

About

A easy tool to parse cli arguments into a args arrray.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages