Problem using Classes like Structs in PHP 4
| From: | Michael Crusi | Date: | Wed, 06 Sep 2000 19:56:56 +0000 |
| Subject: | Problem using Classes like Structs in PHP 4 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15585@lists.php.net to get a copy of this message | ||
I set up classes in this way:
class first {
var $a;
var $b;
}
class second {
var $c;
var $d= new first;
}
In PHP 3, this use of classes like a struct worked just fine. In PHP 4.0.1, I get a parse error when php parses the "var $d...." line.
Can anyone clue me in on what has changed?
Thanks!
Mike