php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33535 $_SERVER['argv'] returns an unusefull array
Submitted: 2005-07-01 16:17 UTC Modified: 2005-07-01 16:30 UTC
From: cristian dot zuddas at gmail dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.3.11 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cristian dot zuddas at gmail dot com
New email:
PHP Version: OS:

 

 [2005-07-01 16:17 UTC] cristian dot zuddas at gmail dot com
Description:
------------
The var. $_SERVER['argv'] returns an array with only ONE element, that contains all the query string. I don't think is correct... why the var. contains an array with only one string, and not directly a (less expensive) string?

Reproduce code:
---------------
print_r($_SERVER['argv']);

Expected result:
----------------
string type:   l=26&p=5&g=fsd

OR

Array
(
    [0] => l=26
    [1] => p=5
    [2] => g=fsd
)

Actual result:
--------------
Array
(
    [0] => l=26&p=5&g=fsd
)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-01 16:30 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Because in command line arguments are passed in different way and "a=1&b=2" syntax is used only in URLs.

See details here: http://www.php.net/manual/en/features.commandline.php 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC