Hello,
class a {
var $somevar;
function b(){
if (!isset($this->somevar))
echo "Not set<br>";
if (empty($this->somevar))
echo "empty<br>";
}
}
$d = new a;
$d->b();
The above returns:
Not set
empty
What in the world is reason for declaring the following in the class?:
var $somevar;
I see no reason, and no differences if I don't declare: var $somevar;
Maybe a better question is what will break if I do not declare
my vars in my class definition?
Thanks,
Sam
----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]