Bug #52174 [Opn->Bgs]: About Predefined Variables ($_POST, $_GET...)
| From: | rasmus@php.net | Date: | Thu, 24 Jun 2010 15:07:10 +0000 |
| Subject: | Bug #52174 [Opn->Bgs]: About Predefined Variables ($_POST, $_GET...) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151843@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52174&edit=1
ID: 52174
Updated by: rasmus@php.net
Reported by: vinicius dot costa dot pires at gmail dot com
Summary: About Predefined Variables ($_POST, $_GET...)
-Status: Open
+Status: Bogus
Type: Bug
Package: *General Issues
Operating System: Windows
PHP Version: 5.3.2
New Comment:
Because you prefer to type -> over []'s? You don't make something an
object just
because you prefer the syntax. You make something an object if it
carries methods
that uniquely manipulate the data and in this case there are no such
methods.
_GET, _POST are simply arrays of strings and should be represented as
such.
Previous Comments:
------------------------------------------------------------------------
[2010-06-24 17:03:46] vinicius dot costa dot pires at gmail dot com
Description:
------------
Hey guys...
I didn't find another place in the website to say that... It's not
exatly a bug, it's more for a suggestion for upgrading PHP.
We have the predefined variables and the ways to access it...
I think that a better way to access these variables would be as an
object.
Or better, it could be both ways.
We usually access these variables with $_POST['data'], or session values
like $_SESSION['user'], or $_REQUEST['birthday']...
We could make these variables objects, like $_POST->data,
$_SESSION->user, or $_REQUEST->birthday...
For specific variables like $_FILES, it would be even better to access
data, like $_FILES->image->size.
That's something you could change in the next version of PHP.
Sorry to write it here, I didn't find another place to post this.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52174&edit=1