Hello everybody,
I know I can do
class myClass{
…
…
}
$class = ‘myClass’;
$instance = new $class;
… and everything works fine. But
when i use namespaces and I try to do the same dynamic call I get errors
ie
use \path\ o\example as example
$class = ‘example\myClass’;
$instance = new $class;
Is not working.
I must also say that the following works
$instance = new example\myClass ;
Is there something wrong with what I am trying to do ?
Thank you in advance!