php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52185 superglobals as objects
Submitted: 2010-06-25 22:08 UTC Modified: 2010-06-25 23:24 UTC
From: tobias dot sattler at gmx dot de Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant OS: Mac OSX
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tobias dot sattler at gmx dot de
New email:
PHP Version: OS:

 

 [2010-06-25 22:08 UTC] tobias dot sattler at gmx dot de
Description:
------------
In times of OOP it would be nice if you can just use the superglobals as objects.

Of course you can do it yourself with $foo = (object)$_POST; but then the compiler has do the work twice instead of once.

Therefore it would be nice if there is a switch in php.ini file like

use_superglobals_as_objects = no; # yes - $_POST->foo, $_GET->foobar


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-25 23:24 UTC] dtajchreber@php.net
-Status: Open +Status: Duplicate
 [2010-06-25 23:24 UTC] dtajchreber@php.net
See #52174.
 [2010-06-25 23:24 UTC] dtajchreber@php.net
-Status: Duplicate +Status: Bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 10:00:01 2025 UTC