Bug #52174 [Com]: About Predefined Variables ($_POST, $_GET...)
| From: | vinicius dot costa dot pires at gmail dot com | Date: | Tue, 29 Jun 2010 19:44:33 +0000 |
| Subject: | Bug #52174 [Com]: About Predefined Variables ($_POST, $_GET...) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151966@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
Comment by: vinicius dot costa dot pires at gmail dot com
Reported by: vinicius dot costa dot pires at gmail dot com
Summary: About Predefined Variables ($_POST, $_GET...)
Status: Bogus
Type: Bug
Package: *General Issues
Operating System: Windows
PHP Version: 5.3.2
New Comment:
If you put it that way :D
No, really...
Sorry. I forgot about the methods.
Just forget it... Stupid thing I said.
Previous Comments:
------------------------------------------------------------------------
[2010-06-24 17:07:10] rasmus@php.net
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.
------------------------------------------------------------------------
[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