PHP -f or -q?

From: Date: Fri, 19 Jul 2002 01:28:27 +0000
Subject: PHP -f or -q?
Groups: php.dev 
Request: Send a blank email to php-dev+get-86019@lists.php.net to get a copy of this message
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

« previous php.dev (#86019) next »