 <p>The most comprehensive library i know of (and the only one i've actually used) is <a href="http://pear.php.net/package/Console_CommandLine" rel="nofollow">Console_CommandLine</a>. I have not used argparse so I can't tell you if it is as featured or compare them.</p>