I seem to be stuck on a very basic PHP issue.
$test = new TestClass;
Works and creates an object of TestClass.
$class = 'TestClass';
$test = new $class;
Fails with the error Uncaught Error: Class 'TestClass' not found.
Why is this failing? I used this a lot in the passed and then it always worked. Could it be because of the Namespaces? How do I need to load it then?
All these classes are in the same namespace and are being called from the same namespace