So I want to do something like this:
$ob = new $this->other_class_name;
but it fails. How can I do it without storing other_class_name in local variable?
Try this:
$class = get_class($this->other_class_name);
$ob = new $class;
$this->other_class_name a string and not an object?