Re: Inconsistent command line formats
| From: | Hannes Magnusson | Date: | Sun, 25 Nov 2007 19:31:56 +0000 |
| Subject: | Re: Inconsistent command line formats | ||
| References: | 1 2 3 4 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969378373@lists.php.net to get a copy of this message | ||
On Nov 11, 2007 3:30 PM, Hannes Magnusson <hannes.magnusson@gmail.com> wrote:
> On Nov 11, 2007 3:23 PM, Edward Z. Yang <edwardzyang@thewritingpot.com> wrote:
> > 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";
> >
> > > }
>
> Flah. I somehow read "config.php", as in the PhD config file.
>
> It is using = because thats how ./configure works.
> I suppose we should support both in configure.php, but there is
> nothing we can do about that for phd except patch PHP (which I
> actually think we should) :)
--opt=value and -opt=value works now with PHP getopt() :)
-Hannes