I tried to do following stuff:
class Foo {
private $bar = new baz(); // Expression is not allowed as field default value
}
class Baz {
public function __construct() {
echo "hello world";
}
}
I cant find any results why the expression should not be allowed. Why can i assign string, integer and other data types but no objects?