Home >Backend Development >PHP Tutorial >关于php argv解析的问题

关于php argv解析的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:19:241324browse

node下有optimist
php有没有类似的工具.

回复内容:

node下有optimist
php有没有类似的工具.

一、Symfony框架,其中的一个组件symfony/console(可以单独使用),可以用来制作命令行工具,自然,用它可以方便的解析命令行参数,链接如下:

https://github.com/symfony/console

http://symfony.com/doc/current/components/console/introduction.html


二、另外,专门用来解析参数的工具有:Getopt.PHP,链接如下:

https://github.com/ulrichsg/getopt-php

http://ulrichsg.github.io/getopt-php/

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn