|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 09:03:38 2021 UTC