php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
11 + 22 = ?
Subscribe to this entry?

 
 [2013-11-22 19:48 UTC] splashcd at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/reserved.variables.argv
---
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?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-26 07:18 UTC] frozenfire@php.net
-Status: Open +Status: Wont fix
 [2013-11-26 07:18 UTC] frozenfire@php.net
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: Mon Jun 17 05:01:31 2024 UTC