By using the magic method __toString() in class, I can make the PHP class instance return a string value, however, I want to return object instead of string.
Here is example
In the class:
$sql = mysql_query("SELECT * FROM users");
I want the class to return $sql
Then I can use the following to get $sql
$myClass = new ClassName();
Now, $myClass should be $sql
How can I do that?