|  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
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:
Solve the problem:
24 - 6 = ?
Subscribe to this entry?

 [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 Dec 04 18:01:23 2020 UTC