Edit report at http://bugs.php.net/bug.php?id=52174&edit=1

 ID:               52174
 Updated by:       ras...@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

Reply via email to