Possible duplicate:
declare a property as an object?
in java you can create an object immediately after the property field, for example:
but it doesn't seem to work for php:
class Test {
public $object = new Object();
}
do you need to create it in __construct () and assign it to a property?
thank
source
share