note 15873 deleted from language.oop by vincent
| From: | vincent@php.net | Date: | Thu, 11 Sep 2003 19:55:58 +0000 |
| Subject: | note 15873 deleted from language.oop by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56197@lists.php.net to get a copy of this message | ||
Note Submitter: mikejohnson@collegecommunityonline.com
----
You can set object properties to have default values. As long as those values don't come from
some other variable.
for example
class foo{
var $test1 = "test";
var $test2 = "test2";
}
would be legal
but
class foo{
var $test1 = $GLOBALS[PHP_SELF];
var $test2 = $GLOBALS[HTTP_HOST];
}
would not be legal