Implicit "this" pointers.
| From: | Szii | Date: | Fri, 21 Apr 2000 05:45:28 +0000 |
| Subject: | Implicit "this" pointers. | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13849@lists.php.net to get a copy of this message | ||
Can we get them for objects, please please please?
class me
{
var $something;
function me()
{
wave(); #won't work! needs $this->
SayHi(); #here either! needs $this->
$something = "Does this work?" # won't work, needs $this->
$this->wave(); #works
}
function SayHi()
{
echo "Hi!";
}
function wave()
{
echo "*wave*";
}
}
It's very tedious to keep tying $this-> over and over. Maybe I'm
just too spoiled on C++...
-Szii