|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66153 $argv documentation specific to command line
Submitted: 2013-11-22 19:48 UTC Modified: 2013-11-26 07:18 UTC
From: splashcd at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 5.5.6 OS:
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: splashcd at gmail dot com
New email:
PHP Version: OS:


 [2013-11-22 19:48 UTC] splashcd at gmail dot com
From manual page:
According to your documentation:
Contains an array of all the arguments passed to the script when running from the command line.

However, $argv will contain
Array ( [0] => r=1&t=2 ) 
When I run from browser with URL parameters "r=1&t=2"

Shouldnt the documentation mention something about what $argv will contain when run from a URL?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-26 07:18 UTC]
-Status: Open +Status: Wont fix
 [2013-11-26 07:18 UTC]
This is a SAPI-specific (your webserver) behaviour which should not be relied upon. I just tested it myself with nginx, and $argv is null.

I'm sure you can understand that SAPIs can cause all sorts of behaviours in PHP's invocation, and it's not feasible or sane to document all of them, so I'm marking this as wont-fix.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 13:01:29 2024 UTC