Bug #4112: Command line argument processing broken
| From: | viola at debonet dot com | Date: | Wed, 12 Apr 2000 02:56:17 +0000 |
| Subject: | Bug #4112: Command line argument processing broken | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17826@lists.php.net to get a copy of this message | ||
From: viola@debonet.com
Operating system: Linux Redhat 6.1
PHP version: 3.0.16
PHP Bug Type: Other
Bug description: Command line argument processing broken
First of all this is a bug in PHP/4.0RC1.
I wrote a very simple php "script" to look at the command
line args passed -- args.php.
#!/usr/local/bin/php -q
<?php
echo "$argc\n";
for ($i = 0; $i < $argc ; $i++) {
echo "$i {$argv[$i]}\n";
}
?>
I then called :
> ./args.php "http://foo.com/one?bar=++10&baz=100"
4
0 ./args.php
1 http://foo.com/one?bar=
2
3 10&baz=100
Notice that even though the arg is quoted, the +'s seem
to split the single arg into 3.