I was wondering if there is such a thing like dynamic Class and Function calling possible?
For example, I have these two operations:
$this->foo->value();
$this->bar->value();
and I would like to call it somewhat like this:
$this->($var)->value();
right now I'm doing it this way (but would love the above methode)
if($var == 'foo')
$this->foo->value();
else
$this->bar->value();