|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-25 11:35 UTC] goba@php.net
I have tries the following script (test.php):
<?php var_dump($argv); ?>
With:
php test.php a b c
and the results are:
array(4) {
[0]=>
string(8) "test.php"
[1]=>
string(1) "a"
[2]=>
string(1) "b"
[3]=>
string(1) "c"
}
What was new to me, is that
php test.php a+b+c
produces the same ;) So if this is intentional,
then it should be documented at least ;)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 00:00:01 2025 UTC |
The same effect is reproduceable with: php test.php a=b=c php test.php a;b;c Gobawith cgi-version(4.2.1, win2k): test.php a b c array(4) { [0]=> string(8) "test.php" [1]=> string(1) "a" [2]=> string(1) "b" [3]=> string(1) "c" } php test.php a+b+c array(4) { [0]=> string(8) "test.php" [1]=> string(1) "a" [2]=> string(1) "b" [3]=> string(1) "c" } php test.php a=b=c array(2) { [0]=> string(8) "test.php" [1]=> string(5) "a=b=c" } php test.php a;b;c array(2) { [0]=> string(8) "test.php" [1]=> string(5) "a;b;c" } Only a+b+c seems to bahave "strange". with cli-version(4.2.1,win2k): php-cli test.php a b c array(4) { [0]=> string(8) "test.php" [1]=> string(1) "a" [2]=> string(1) "b" [3]=> string(1) "c" } php-cli test.php a+b+c array(2) { [0]=> string(8) "test.php" [1]=> string(5) "a+b+c" } php-cli test.php a=b=c array(2) { [0]=> string(8) "test.php" [1]=> string(5) "a=b=c" } php-cli test.php a;b;c array(2) { [0]=> string(8) "test.php" [1]=> string(5) "a;b;c" ) The same results for cgi and cli version in 4.2.2 on win. Only a+b+c seems to be strange with the cgi. Friedhelmwith cgi 4.1.2 on win i get only strange results for a+b+c php test.php a+b+c array(4) { [0]=> string(8) "test.php" [1]=> string(1) "a" [2]=> string(1) "b" [3]=> string(1) "c" }