For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > November 2007 > Re: [PHP-DOC] Inconsistent command line formats









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DOC] Inconsistent command line formats
Hannes Magnusson

2007-11-11, 8:00 am

On Nov 11, 2007 2:24 AM, Edward Z. Yang <edwardzyang@thewritingpot.com> wrote:
> configure.php and build.php have inconsistent command line formats. I.e.
>
> configure.php --option=value
> build.php --option value
>
> Well, which should it be?


I don't know how you managed to get --option=value to work, PHP
getopt() doesnt support it...

-Hannes
Edward Z. Yang

2007-11-11, 7:05 pm

Hannes Magnusson wrote:
> I don't know how you managed to get --option=value to work, PHP
> getopt() doesnt support it...


As far as I can tell, configure.php doesn't use getopt...

> foreach ($_SERVER['argv'] as $opt) {
> if (strpos($opt, "=") !== false) {
> list($o, $v) = explode("=", $opt);
> } else {
> $o = $opt;
> $v = "yes";
> }


--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com