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: Anyway, in function mysql_fetch_object() documentation, it doesn't mention any method returned by the database query. I've been using it and replacing all my coding to fit OO to get used to the new features of lastest PHP, then I just thought it would fit as a good idea. So it wasn't so clear that you can only make an object if it carries a method. In that you have to agree that there's no use for you to answer me like you did. Previous Comments: ------------------------------------------------------------------------ [2010-06-29 21:44:33] vinicius dot costa dot pires at gmail dot com If you put it that way :D No, really... Sorry. I forgot about the methods. Just forget it... Stupid thing I said. ------------------------------------------------------------------------ [2010-06-24 17:07:10] ras...@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