Is there a way to use a private variable to declare an other private variable? My Code looks like this:
class MyClass{
private $myVar = "someText";
private $myOtherVar = "something" . $this->myVar . "else";
}
But this ends in a PHP Fatal error: Constant expression contains invalid operations
Tried it with and withoud $this->
Is there a way to do this in php?