|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76781 Add an option to set the order of $_GET
Submitted: 2018-08-22 21:50 UTC Modified: 2018-08-23 03:25 UTC
From: hitodado at bit-degree dot com Assigned:
Status: Suspended Package: PHP options/info functions
PHP Version: 7.2.9 OS: ubuntu 16.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: hitodado at bit-degree dot com
New email:
PHP Version: OS:


 [2018-08-22 21:50 UTC] hitodado at bit-degree dot com
Add an option in the php.ini file to make PHP read the first variable with the same key in the url. Thank you.

// --------------------------------
// PS.: Yes, it's possible to parse $_SERVER['QUERY_STRING'], but it would better to have a native option.
// PSĀ².: Sorry if this is not the place for suggestions. 

Test script:
// Example URL:

ini_set('variables_key_order', 'first');

echo $_GET['var']; // => foo

// --------------------------------

ini_set('variables_key_order', 'last'); // last is default

echo $_GET['var']; // => bar


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-23 00:16 UTC]
-Type: Bug +Type: Feature/Change Request
 [2018-08-23 03:25 UTC]
-Status: Open +Status: Suspended
 [2018-08-23 03:25 UTC]
Surely something that could get you *all* the values would be better?

A change like this would require some discussion and possibly an RFC.
When the mailing lists are back up again, feel free to raise the subject on the internals list.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 22:01:24 2020 UTC