|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68008 When variables_order is set to "" doesn't work as expected
Submitted: 2014-09-11 18:04 UTC Modified: 2021-04-27 14:25 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: joksnet at gmail dot com Assigned:
Status: Verified Package: *Configuration Issues
PHP Version: 5.5.16 OS: x86_64 GNU/Linux
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: joksnet at gmail dot com
New email:
PHP Version: OS:


 [2014-09-11 18:04 UTC] joksnet at gmail dot com

When the setting `variables_order` is set to "", the documentation [0] says:

>  Setting to "" means no superglobals will be set.

But instead the default "EGPCS" is set.

The only way I found of disable superglobals (because `track_vars` is deprecated) is to set `variables_order` to a letter different of "EGPCS", like "N". This way superglobals are set (`isset($_SERVER)` still true), but not populated.


Test script:
% php -n -d variables_order="" -r "var_dump(\$_SERVER);"
% php -n -d variables_order="N" -r "var_dump(\$_SERVER);"

Expected result:
array(0) {
array(0) {

Actual result:
array(52) {
  string(8) "/bin/zsh"
  string(14) "xterm-256color"
array(0) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-04-27 14:25 UTC]
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2021-04-27 14:25 UTC]
The documentation is obviously wrong, since the on_modify handler
of variables_orders is OnUpdateStringUnempty[1].

[1] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 12 18:01:34 2024 UTC