Console::GetOpts
| From: | Colin Viebrock | Date: | Fri, 22 Jun 2001 18:57:15 +0000 |
| Subject: | Console::GetOpts | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-485@lists.php.net to get a copy of this message | ||
Take the following code:
array_shift($argv);
$opts = Console_Getopt::getopt( $argv, 'd:hp:x', array('help') );
print_r($opts);
Now, if I run my script as:
scriptname --help
This is what I get:
Array
(
[0] => Array
(
[0] => Array
(
[0] => --
[1] =>
)
)
[1] => Array
(
)
)
I'm thinking that $opts[0][0][0] should be '--help' not '--', right?
I'm using the version of Console::GetOpt included in 4.0.6RC4
(// $Id: Getopt.php,v 1.2 2001/03/12 03:05:04 andrei Exp $)
--
Colin Viebrock
Co-Founder, easyDNS Technologies Inc.
http://www.easyDNS.com/