|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-05-22 20:32 UTC] hholzgra at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jun 10 21:00:01 2026 UTC |
Following script (argv.php3): #!/usr/bin/php -f <? printf("argc: %d\nargv1-2:%s-%s\n",$argc,$argv[0],$argv[1]); ?> when run as ./argv.php3 (without parameters), says: argc: 1 argv1-2:- when run as ./argv.php3 abc (1 parameter), says: argc: 1 argv1-2:abc- Shouldn't argc be different in two cases? When I do not put -f, script name is included in argv and argc is OK. Same effects if I run php -f argv.php3 (like the first case) and php argv.php3 (like the second case).