首页 > 关于php argv解析的问题

关于php argv解析的问题

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/

【热门文章】
【热门文章】