note 5228 deleted from Classes and Objects by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 06 Sep 2000 23:37:34 +0000 |
| Subject: | note 5228 deleted from Classes and Objects by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4273@lists.php.net to get a copy of this message | ||
Aieee...in a class declaration, there is no implicit "this" pointer!
<PRE>
class me
{
var $something;
function me()
{
wave(); #won't work!
SayHi(); #here either!
$something = "Does this work?"
}
function SayHi()
{
echo "Hi!";
}
function wave()
{
echo "*wave*";
}
</PRE>
On class methods, there's no implicit "this" on the method calls, and from the docs
it doesn't look like on variable assignments either to member variables!
-Szii "writhing in pain at all the "$this->" code.... =P