I am executing PHP CGI scripts from the command line. I usually run scripts
using the -f switch. However I recently started passing arguments to the
scripts and notice that if the first argument after the name of the script
is a hyphenated argument it will not be passed to the script. For example,
this works:

% php -f script.php a --b

[argv] => Array
(
 [0] => script.php
 [1] => a
 [2] => --b
)

However, this does not:

% php -f script.php --a --b

[argv] => Array
(
 [0] => script.php
 [1] => --b
)

Using the -q switch instead of -f works:

% php -q script.php --a --b

[argv] => Array
(
 [0] => script.php
 [1] => --a
 [2] => --b
)

Is this a bug? When should one use the -f switch versus the -q switch? BTW,
I'm running Red Hat 7.2 with the latest version of PHP.

Thanks!
Lance


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to