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
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.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 10:01:32 2024 UTC